summaryrefslogtreecommitdiff
path: root/testautomation/writer/tools
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/writer/tools')
-rw-r--r--testautomation/writer/tools/includes/w_get_locale_strings.inc180
-rw-r--r--testautomation/writer/tools/includes/w_locale_strings2.inc367
-rw-r--r--testautomation/writer/tools/includes/w_tool1.inc1022
-rw-r--r--testautomation/writer/tools/includes/w_tool2.inc423
-rw-r--r--testautomation/writer/tools/includes/w_tool3.inc643
-rw-r--r--testautomation/writer/tools/includes/w_tool4.inc210
-rw-r--r--testautomation/writer/tools/includes/w_tool5.inc235
-rw-r--r--testautomation/writer/tools/includes/w_tool6.inc769
-rw-r--r--testautomation/writer/tools/includes/w_tool7.inc460
-rw-r--r--testautomation/writer/tools/includes/w_tools.inc1367
-rw-r--r--testautomation/writer/tools/includes/w_tools_autocorrection.inc157
-rw-r--r--testautomation/writer/tools/includes/w_tools_drawing.inc68
-rw-r--r--testautomation/writer/tools/includes/w_tools_hyphenation.inc79
-rw-r--r--testautomation/writer/tools/includes/w_tools_undo.inc867
-rwxr-xr-xtestautomation/writer/tools/w_get_locale_strings.bas50
15 files changed, 6897 insertions, 0 deletions
diff --git a/testautomation/writer/tools/includes/w_get_locale_strings.inc b/testautomation/writer/tools/includes/w_get_locale_strings.inc
new file mode 100644
index 000000000000..3e10bdb3d6ce
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_get_locale_strings.inc
@@ -0,0 +1,180 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : testcase to get Locale Strings used in Writer Optional-Test
+'*
+'\***********************************************************************
+
+sub w_get_locale_strings
+
+ Call wAllFieldNames
+ Call wUsedInTableTest
+ Call wUsedInLoadSaveTests
+
+end sub
+
+'------------------------------------------------------------------------------------------------
+
+testcase wAllFieldNames
+ Dim i as integer
+ Dim j as integer
+
+ printlog " get all field descriptions (used in w_tools.inc)"
+ Call hNewDocument
+
+ InsertFieldsOther
+ for i = 1 to 5
+ Kontext
+ Select Case i
+ Case 1
+ printlog "Tabpage Document"
+ Active.Setpage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ Case 2
+ printlog "Tabpage References"
+ Active.Setpage TabReferenzen
+ Kontext "TabReferenzen"
+ Case 3
+ printlog "Tabpage Functions"
+ Active.Setpage TabFunktionen
+ Kontext "TabFunktionen"
+ Case 4
+ printlog "Tabpage DocInformation"
+ Active.Setpage TabDokumentInfoFeldbefehle
+ Kontext "TabDokumentInfoFeldbefehle"
+ Case 5
+ printlog "Tabpage Variables"
+ Active.Setpage TabVariablen
+ Kontext "TabVariablen"
+ end select
+
+ if i = 4 then
+ for j = 1 to Feldtyp.GetItemCount
+ Feldtyp.Select j
+ Feldtyp.TypeKeys "+"
+ next j
+ end if
+
+ for j = 1 to Feldtyp.GetItemCount
+ Feldtyp.Select j
+ printlog "- " & Feldtyp.GetSelText
+ next j
+ next i
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------
+
+testcase wUsedInTableTest
+
+ Dim pos as integer
+ Dim wTableName as string
+
+ printlog " gets all strings which are used in '.\\optional\\w_table.bas'"
+ printlog " add these entries into file : .\\optional\input\\table\\locale.txt"
+ Call hNewDocument
+
+ InsertTableWriter
+ Kontext "TabelleEinfuegenWriter"
+ TabelleEinfuegenWriter.Ok
+ Sleep 1
+ Kontext "TableObjectbar"
+ printlog " Table Heading: " & Vorlage2.GetSelText
+ Kontext "DocumentWriter"
+ Call wTypeKeys "<Down>"
+ Sleep 1
+ Kontext "TableObjectbar"
+ printlog " Table Contents: " & Vorlage2.GetSelText
+ Kontext "DocumentWriter"
+ wait 500
+ FormatNumberFormat
+ Kontext "Zahlenformat"
+ Kategorie.Select 3
+ printlog "Number: " & Kategorie.GetSelText
+ Kategorie.Select 11
+ printlog "Text: " & Kategorie.GetSelText
+ Kategorie.Select 5
+ printlog "Currency: " & Kategorie.GetSelText
+ Kategorie.Select 6
+ printlog "Date: " & Kategorie.GetSelText
+ Kategorie.Select 7
+ printlog "Time: " & Kategorie.GetSelText
+ Kategorie.Select 4
+ printlog "Percent: " & Kategorie.GetSelText
+ Kategorie.Select 8
+ printlog "Scientific: " & Kategorie.GetSelText
+ Kategorie.Select 9
+ printlog "Fraction: " & Kategorie.GetSelText
+ Kategorie.Select 10
+ printlog "Boolean Value: " & Kategorie.GetSelText
+ Zahlenformat.Cancel
+ InsertTableWriter
+ Wait 500
+ Kontext "TabelleEinfuegenWriter"
+ wTableName = TabellenName.Gettext
+ pos = Instr(wTableName, "2")
+ if pos > 0 then
+ wTableName = Left$(wTableName, pos -1)
+ end if
+ printlog "Table: " & wTableName
+ TabelleEinfuegenWriter.Cancel
+
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------
+
+testcase wUsedInLoadSaveTests
+ Dim i as integer
+
+ Call hNewDocument
+ printlog "- All filters from open dialog:"
+ FileOpen
+ Kontext "OeffnenDlg"
+ For i = 1 to Dateityp.GetItemCount
+ Dateityp.Select i
+ printlog " - " & Dateityp.GetSelText
+ next i
+
+ OeffnenDlg.Cancel
+
+ printlog "- All filters from save dialog:"
+ FileSaveAs
+ Kontext "SpeichernDlg"
+ For i = 1 to Dateityp.GetItemCount
+ Dateityp.Select i
+ printlog " - " & Dateityp.GetSelText
+ next i
+
+ SpeichernDlg.Cancel
+
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/tools/includes/w_locale_strings2.inc b/testautomation/writer/tools/includes/w_locale_strings2.inc
new file mode 100644
index 000000000000..a679ecbabc04
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_locale_strings2.inc
@@ -0,0 +1,367 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/***********************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : defining locale dependant strings for language guessing
+'*
+'\***********************************************************************
+function wGetLanguageGuessString(sValue as string, iLanguageCount as integer) as string 'function for getting strings out of this file
+
+ 'Variables:
+ DIM WordPreSet as string 'string as it shoud be for words
+ DIM ParagraphPreSet as string 'string as it shoud be for paragraphs
+
+ '///already covered Office languages: ///'
+ '///english 01 ///'
+ '///russian 07 ///'
+ '///dutch 31 ///'
+ '///french 33///'
+ '///spanish 34 ///'
+ '///hungarian 36 ///'
+ '///italian 39 ///'
+ '///swedish 46 ///'
+ '///polish 48 ///'
+ '///german 49 ///'
+ '///german 55 ///'
+
+ '///already covered languages in the test document: ///'
+ '///Case 1: english ///'
+ '///Case 2: portugese///'
+ '///Case 3: russian///'
+ '///Case 4: dutch///'
+ '///Case 5: french///'
+ '///Case 6: spanish///'
+ '///Case 7: hungarian///'
+ '///Case 8: italian///'
+ '///Case 9: swedish///'
+ '///Case 10: polish///'
+ '///Case 11: german///'
+
+ Select Case iSprache 'Detecting Office language
+ Case 01 'Case 01: english
+ '-----------------------------------------------------------------------
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Word is English (USA)"
+ ParagraphPreSet = "Paragraph is English (USA)"
+ Case 2: WordPreSet = "Word is Portuguese (Portugal)"
+ ParagraphPreSet = "Paragraph is Portuguese (Portugal)"
+ Case 3: WordPreSet = "Word is Russian"
+ ParagraphPreSet = "Paragraph is Russian"
+ Case 4: WordPreSet = "Word is Dutch (Netherlands)"
+ ParagraphPreSet = "Paragraph is Dutch (Netherlands)"
+ Case 5: WordPreSet = "Word is French (France)"
+ ParagraphPreSet = "Paragraph is French (France)"
+ Case 6: WordPreSet = "Word is Spanish (Spain)"
+ ParagraphPreSet = "Paragraph is Spanish (Spain)"
+ Case 7: WordPreSet = "Word is Hungarian"
+ ParagraphPreSet = "Paragraph is Hungarian"
+ Case 8: WordPreSet = "Word is Italian (Italy)"
+ ParagraphPreSet = "Paragraph is Italian (Italy)"
+ Case 9: WordPreSet = "Word is Swedish (Sweden)"
+ ParagraphPreSet = "Paragraph is Swedish (Sweden)"
+ Case 10:WordPreSet = "Word is Polish"
+ ParagraphPreSet = "Paragraph is Polish"
+ Case 11:WordPreSet = "Word is German (Germany)"
+ ParagraphPreSet = "Paragraph is German (Germany)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 07 'Case 07: russian
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Язык слова: Английский (США)"
+ ParagraphPreSet = "Язык абзаца: Английский (США)"
+ Case 2: WordPreSet = "Язык слова: Португальский (Португалия)"
+ ParagraphPreSet = "Язык абзаца: Португальский (Португалия)"
+ Case 3: WordPreSet = "Язык слова: Русский"
+ ParagraphPreSet = "Язык абзаца: Русский"
+ Case 4: WordPreSet = "Язык слова: Голландский (Нидерланды)"
+ ParagraphPreSet = "Язык абзаца: Голландский (Нидерланды)"
+ Case 5: WordPreSet = "Язык слова: Французский (Франция)"
+ ParagraphPreSet = "Язык абзаца: Французский (Франция)"
+ Case 6: WordPreSet = "Язык слова: Испанский (Испания)"
+ ParagraphPreSet = "Язык абзаца: Испанский (Испания)"
+ Case 7: WordPreSet = "Язык слова: Венгерский"
+ ParagraphPreSet = "Язык абзаца: Венгерский"
+ Case 8: WordPreSet = "Язык слова: Итальянский (Италия) "
+ ParagraphPreSet = "Язык абзаца: Итальянский (Италия) "
+ Case 9: WordPreSet = "Язык слова: Шведский (Швеция)"
+ ParagraphPreSet = "Язык абзаца: Шведский (Швеция)"
+ Case 10:WordPreSet = "Язык слова: Польский"
+ ParagraphPreSet = "Язык абзаца: Польский"
+ Case 11:WordPreSet = "Язык слова: Немецкий (Германия)"
+ ParagraphPreSet = "Язык абзаца: Немецкий (Германия)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 31 'Case 31: dutch
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Woord is Engels (VS)"
+ ParagraphPreSet = "Alinea is Engels (VS)"
+ Case 2: WordPreSet = "Woord is Portugees (Portugal)"
+ ParagraphPreSet = "Alinea is Portugees (Portugal)"
+ Case 3: WordPreSet = "Woord is Russisch"
+ ParagraphPreSet = "Alinea is Russisch"
+ Case 4: WordPreSet = "Woord is Nederlands (NL)"
+ ParagraphPreSet = "Alinea is Nederlands (NL)"
+ Case 5: WordPreSet = "Woord is Frans (Frankrijk)"
+ ParagraphPreSet = "Alinea is Frans (Frankrijk)"
+ Case 6: WordPreSet = "Woord is Spaans (Spanje)"
+ ParagraphPreSet = "Alinea is Spaans (Spanje)"
+ Case 7: WordPreSet = "Woord is Hongaars"
+ ParagraphPreSet = "Alinea is Hongaars"
+ Case 8: WordPreSet = "Woord is Italiaans (Italië)"
+ ParagraphPreSet = "Alinea is Italiaans (Italië)"
+ Case 9: WordPreSet = "Woord is Zweeds (Zweden)"
+ ParagraphPreSet = "Alinea is Zweeds (Zweden)"
+ Case 10:WordPreSet = "Woord is Pools"
+ ParagraphPreSet = "Alinea is Pools"
+ Case 11:WordPreSet = "Woord is Duits (Duitsland)"
+ ParagraphPreSet = "Alinea is Duits (Duitsland)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 33 'Case 33: french
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Le mot est en Anglais (U.S.A.)"
+ ParagraphPreSet = "Le paragraphe est en Anglais (U.S.A.)"
+ Case 2: WordPreSet = "Le mot est en Portugais (Portugal)"
+ ParagraphPreSet = "Le paragraphe est en Portugais (Portugal)"
+ Case 3: WordPreSet = "Le mot est en Russe"
+ ParagraphPreSet = "Le paragraphe est en Russe"
+ Case 4: WordPreSet = "Le mot est en Néerlandais (Pays-Bas)"
+ ParagraphPreSet = "Le paragraphe est en Néerlandais (Pays-Bas)"
+ Case 5: WordPreSet = "Le mot est en Français (France)"
+ ParagraphPreSet = "Le paragraphe est en Français (France)"
+ Case 6: WordPreSet = "Le mot est en Espagnol (Espagne)"
+ ParagraphPreSet = "Le paragraphe est en Espagnol (Espagne)"
+ Case 7: WordPreSet = "Le mot est en Hongrois"
+ ParagraphPreSet = "Le paragraphe est en Hongrois"
+ Case 8: WordPreSet = "Le mot est en Italien (Italie)"
+ ParagraphPreSet = "Le paragraphe est en Italien (Italie)"
+ Case 9: WordPreSet = "Le mot est en Suédois (Suède)"
+ ParagraphPreSet = "Le paragraphe est en Suédois (Suède)"
+ Case 10: WordPreSet = "Le mot est en Polonais"
+ ParagraphPreSet = "Le paragraphe est en Polonais"
+ Case 11: WordPreSet = "Le mot est en Allemand (Allemagne)"
+ ParagraphPreSet = "Le paragraphe est en Allemand (Allemagne)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 34 'Case 34: spanish
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "La palabra está Inglés (Estados Unidos)"
+ ParagraphPreSet = "El párrafo es Inglés (Estados Unidos)"
+ Case 2: WordPreSet = "La palabra está Español (España)"
+ ParagraphPreSet = "El párrafo es Portugués (Portugal)"
+ Case 3: WordPreSet = "La palabra está Ruso"
+ ParagraphPreSet = "El párrafo es Ruso"
+ Case 4: WordPreSet = "La palabra está Holandés (Países Bajos)"
+ ParagraphPreSet = "El párrafo es Holandés (Países Bajos)"
+ Case 5: WordPreSet = "La palabra está Francés (Francia)"
+ ParagraphPreSet = "El párrafo es Francés (Francia)"
+ Case 6: WordPreSet = "La palabra está Español (España)"
+ ParagraphPreSet = "El párrafo es Español (España)"
+ Case 7: WordPreSet = "La palabra está Húngaro"
+ ParagraphPreSet = "El párrafo es Húngaro"
+ Case 8: WordPreSet = "La palabra está Italiano (Italia)"
+ ParagraphPreSet = "El párrafo es Italiano (Italia)"
+ Case 9: WordPreSet = "La palabra está Sueco (Suecia)"
+ ParagraphPreSet = "El párrafo es Sueco (Suecia)"
+ Case 10:WordPreSet = "La palabra está Polaco"
+ ParagraphPreSet = "El párrafo es Polaco"
+ Case 11:WordPreSet = "La palabra está Alemán (Alemania)"
+ ParagraphPreSet = "El párrafo es Alemán (Alemania)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 36 'Case 36: hungarian
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "A szó: Angol (USA)"
+ ParagraphPreSet = "Bekezdés: Angol (USA)"
+ Case 2: WordPreSet = "A szó: Portugál (Portugália)"
+ ParagraphPreSet = "Bekezdés: Portugál (Portugália)"
+ Case 3: WordPreSet = "A szó: Orosz"
+ ParagraphPreSet = "Bekezdés: Orosz"
+ Case 4: WordPreSet = "A szó: Holland (Hollandia)"
+ ParagraphPreSet = "Bekezdés: Holland (Hollandia)"
+ Case 5: WordPreSet = "A szó: Francia (Franciaország)"
+ ParagraphPreSet = "Bekezdés: Francia (Franciaország)"
+ Case 6: WordPreSet = "A szó: Spanyol (Spanyolország)"
+ ParagraphPreSet = "Bekezdés: Spanyol (Spanyolország)"
+ Case 7: WordPreSet = "A szó: Magyar"
+ ParagraphPreSet = "Bekezdés: Magyar"
+ Case 8: WordPreSet = "A szó: Olasz (Olaszország)"
+ ParagraphPreSet = "Bekezdés: Olasz (Olaszország)"
+ Case 9: WordPreSet = "A szó: Svéd (Svédország)"
+ ParagraphPreSet = "Bekezdés: Svéd (Svédország)"
+ Case 10:WordPreSet = "A szó: Lengyel"
+ ParagraphPreSet = "Bekezdés: Lengyel"
+ Case 11:WordPreSet = "A szó: Német (Németország)"
+ ParagraphPreSet = "Bekezdés: Német (Németország)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 39 'Case 39: italian
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "La parola è Inglese (USA)"
+ ParagraphPreSet = "Il paragrafo è Inglese (USA)"
+ Case 2: WordPreSet = "La parola è Portoghese (Portogallo)"
+ ParagraphPreSet = "Il paragrafo è Portoghese (Portogallo)"
+ Case 3: WordPreSet = "La parola è Russo"
+ ParagraphPreSet = "Il paragrafo è Russo"
+ Case 4: WordPreSet = "La parola è Olandese (Paesi Bassi)"
+ ParagraphPreSet = "Il paragrafo è Olandese (Paesi Bassi)"
+ Case 5: WordPreSet = "La parola è Francese (Francia)"
+ ParagraphPreSet = "Il paragrafo è Francese (Francia)"
+ Case 6: WordPreSet = "La parola è Spagnolo (Spagna)"
+ ParagraphPreSet = "Il paragrafo è Spagnolo (Spagna)"
+ Case 7: WordPreSet = "La parola è Ungherese"
+ ParagraphPreSet = "Il paragrafo è Ungherese"
+ Case 8: WordPreSet = "La parola è Italiano (Italia)"
+ ParagraphPreSet = "Il paragrafo è Italiano (Italia)"
+ Case 9: WordPreSet = "La parola è Svedese (Svezia)"
+ ParagraphPreSet = "Il paragrafo è Svedese (Svezia)"
+ Case 10: WordPreSet = "La parola è Polacco"
+ ParagraphPreSet = "Il paragrafo è Polacco"
+ Case 11: WordPreSet = "La parola è Tedesco (Germania)"
+ ParagraphPreSet = "Il paragrafo è Tedesco (Germania)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 46 'Case 46: swedish
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Ordet är Engelska (USA)"
+ ParagraphPreSet = "Stycket är Engelska (USA)"
+ Case 2: WordPreSet = "Ordet är Portugisiska (Portugal)"
+ ParagraphPreSet = "Stycket är Portugisiska (Portugal)"
+ Case 3: WordPreSet = "Ordet är Ryska"
+ ParagraphPreSet = "Stycket är Ryska"
+ Case 4: WordPreSet = "Ordet är Svenska (Sverige)"
+ ParagraphPreSet = "Stycket är Holländska (Nederländerna)"
+ Case 5: WordPreSet = "Ordet är Franska (Frankrike)"
+ ParagraphPreSet = "Stycket är Franska (Frankrike)"
+ Case 6: WordPreSet = "Ordet är Spanska (Spanien)"
+ ParagraphPreSet = "Stycket är Spanska (Spanien)"
+ Case 7: WordPreSet = "Ordet är Ungerska"
+ ParagraphPreSet = "Stycket är Ungerska"
+ Case 8: WordPreSet = "Ordet är Italienska (Italien)"
+ ParagraphPreSet = "Stycket är Italienska (Italien)"
+ Case 9: WordPreSet = "Ordet är Svenska (Sverige)"
+ ParagraphPreSet = "Stycket är Svenska (Sverige)"
+ Case 10:WordPreSet = "Ordet är Polska"
+ ParagraphPreSet = "Stycket är Polska"
+ Case 11:WordPreSet = "Ordet är Tyska (Tyskland)"
+ ParagraphPreSet = "Stycket är Tyska (Tyskland)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 48 'Case 48: polish
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Wyraz jest Angielski (USA)"
+ ParagraphPreSet = "Akapit jest Angielski (USA)"
+ Case 2: WordPreSet = "Wyraz jest Portugalski (Portugalia)"
+ ParagraphPreSet = "Akapit jest Portugalski (Portugalia)"
+ Case 3: WordPreSet = "Wyraz jest Rosyjski"
+ ParagraphPreSet = "Akapit jest Rosyjski"
+ Case 4: WordPreSet = "Wyraz jest Holenderski (Holandia)"
+ ParagraphPreSet = "Akapit jest Holenderski (Holandia)"
+ Case 5: WordPreSet = "Wyraz jest Francuski (Francja)"
+ ParagraphPreSet = "Akapit jest Francuski (Francja)"
+ Case 6: WordPreSet = "Wyraz jest Hiszpański (Hiszpania)"
+ ParagraphPreSet = "Akapit jest Hiszpański (Hiszpania)"
+ Case 7: WordPreSet = "Wyraz jest Węgierski"
+ ParagraphPreSet = "Akapit jest Węgierski"
+ Case 8: WordPreSet = "Wyraz jest Włoski (Włochy)"
+ ParagraphPreSet = "Akapit jest Włoski (Włochy)"
+ Case 9: WordPreSet = "Wyraz jest Szwedzki (Szwecja)"
+ ParagraphPreSet = "Akapit jest Szwedzki (Szwecja)"
+ Case 10:WordPreSet = "Wyraz jest Polski"
+ ParagraphPreSet = "Akapit jest Polski"
+ Case 11:WordPreSet = "Wyraz jest Niemiecki (Niemcy)"
+ ParagraphPreSet = "Akapit jest Niemiecki (Niemcy)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 49 'Case 49: german
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "Wort ist Englisch (USA)"
+ ParagraphPreSet = "Absatz ist Englisch (USA)"
+ Case 2: WordPreSet = "Wort ist Portugiesisch (Portugal)"
+ ParagraphPreSet = "Absatz ist Portugiesisch (Portugal)"
+ Case 3: WordPreSet = "Wort ist Russisch"
+ ParagraphPreSet = "Absatz ist Russisch"
+ Case 4: WordPreSet = "Wort ist Niederländisch (Niederlande)"
+ ParagraphPreSet = "Absatz ist Niederländisch (Niederlande)"
+ Case 5: WordPreSet = "Wort ist Französisch (Frankreich)"
+ ParagraphPreSet = "Absatz ist Französisch (Frankreich)"
+ Case 6: WordPreSet = "Wort ist Spanisch (Spanien)"
+ ParagraphPreSet = "Absatz ist Spanisch (Spanien)"
+ Case 7: WordPreSet = "Wort ist Ungarisch"
+ ParagraphPreSet = "Absatz ist Ungarisch"
+ Case 8: WordPreSet = "Wort ist Italienisch (Italien)"
+ ParagraphPreSet = "Absatz ist Italienisch (Italien)"
+ Case 9: WordPreSet = "Wort ist Schwedisch (Schweden)"
+ ParagraphPreSet = "Absatz ist Schwedisch (Schweden)"
+ Case 10:WordPreSet = "Wort ist Polnisch"
+ ParagraphPreSet = "Absatz ist Polnisch"
+ Case 11:WordPreSet = "Wort ist Deutsch (Deutschland)"
+ ParagraphPreSet = "Absatz ist Deutsch (Deutschland)"
+ end select
+ '-----------------------------------------------------------------------
+ Case 55 'Case 55: Portuguese (Brazil)
+ Select Case iLanguageCount
+ Case 1: WordPreSet = "a palavra é Inglês (EUA)"
+ ParagraphPreSet = "O parágrafo é Inglês (EUA)"
+ Case 2: WordPreSet = "a palavra é Português (Brasil)"
+ ParagraphPreSet = "O parágrafo é Português (Portugal)"
+ Case 3: WordPreSet = "a palavra é Russo"
+ ParagraphPreSet = "O parágrafo é Russo"
+ Case 4: WordPreSet = "a palavra é Holandês (Holanda)"
+ ParagraphPreSet = "O parágrafo é Holandês (Holanda)"
+ Case 5: WordPreSet = "a palavra é Francês (França)"
+ ParagraphPreSet = "O parágrafo é Francês (França)"
+ Case 6: WordPreSet = "a palavra é Português (Brasil)"
+ ParagraphPreSet = "O parágrafo é Espanhol (Espanha)"
+ Case 7: WordPreSet = "a palavra é Húngaro"
+ ParagraphPreSet = "O parágrafo é Húngaro"
+ Case 8: WordPreSet = "a palavra é Italiano (Itália)"
+ ParagraphPreSet = "O parágrafo é Italiano (Itália)"
+ Case 9: WordPreSet = "a palavra é Sueco (Suécia)"
+ ParagraphPreSet = "O parágrafo é Sueco (Suécia)"
+ Case 10:WordPreSet = "a palavra é Polonês"
+ ParagraphPreSet = "O parágrafo é Polonês"
+ Case 11:WordPreSet = "a palavra é Alemão (Alemanha)"
+ ParagraphPreSet = "O parágrafo é Alemão (Alemanha)"
+ end select
+ '-----------------------------------------------------------------------
+ case else
+ 'if Office language is not already covered: warning appears.
+ Warnlog "Language has to be added to testcase. Please see w_locale_strings2.inc for further details"
+ QAErrorlog "Please add " & iSprache & " to file!"
+ wGetLanguageGuessString = ""
+ end select
+ '-----------------------------------------------------------------------
+ 'distinguishing if string for word or string for paragraph is handed over
+ if sValue = "WordPreSet" then
+ wGetLanguageGuessString = WordPreSet
+ elseif sValue = "ParagraphPreSet" then
+ wGetLanguageGuessString = ParagraphPreSet
+ end if
+
+end function
diff --git a/testautomation/writer/tools/includes/w_tool1.inc b/testautomation/writer/tools/includes/w_tool1.inc
new file mode 100644
index 000000000000..2131b1bd7dfd
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool1.inc
@@ -0,0 +1,1022 @@
+'*******************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Put description here
+'*
+' \*****************************************************************************
+
+sub hInhalte
+
+ Dim Anzahl as Integer
+ Dim i as Integer
+
+ if ( hUseAsyncSlot( "EditCut" ) = -1 ) then
+ Warnlog "Unable to execute 'Edit / Cut'!. Maybe object not selected!"
+ exit sub
+ endif
+
+ Sleep 1
+ Call gMouseClick ( 99,80 )
+ Sleep 1
+
+ hUseAsyncSlot( "EditPasteSpecialWriter" )
+
+ Kontext "InhaltEinfuegen"
+ if ( InhaltEinfuegen.exists( 1 ) ) then
+ Anzahl = Auswahl.GetItemCount
+ for i = 1 to Anzahl
+ Auswahl.Select i
+ InhaltEinfuegen.OK
+
+ if ( hUseAsyncSlot( "EditDeleteContents" ) = -1 ) then
+ Warnlog "Unable to execute Edit / Delete / Contents ! Entry: " + i
+ else
+ Call gMouseClick ( 99,80 )
+ if ( hUseAsyncSlot( "EditPasteSpecialWriter" ) = -1 ) then
+ warnlog "Unable to execute Edit / Paste / Special!"
+ endif
+ endif
+ Kontext "InhaltEinfuegen"
+ next i
+ InhaltEinfuegen.Cancel
+ else
+ warnlog( "Dialog <InhaltEinfuegen> is not available" )
+ endif
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hObjektmalen
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown 35, 25
+ DocumentWriter.MouseMove 70, 60
+ DocumentWriter.MouseUp 70, 60
+ Sleep 1
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hClipboarden
+
+ if ( hUseAsyncSlot( "EditCut" ) = -1 ) then
+ Warnlog "Unable to Cut object. 'Edit / Cut' is disabled!"
+ exit sub
+ endif
+
+ Call wTypeKeys "<Escape>"
+ hUseAsyncSlot( "EditPaste" )
+
+ hUseAsyncSlot( "EditCopy" )
+ Call wTypeKeys "<Escape>"
+
+ hUseAsyncSlot( "EditPaste" )
+
+ Call wTypeKeys "<Delete>"
+ WaitSlot() ' NOOP
+ Call wTypeKeys "<Escape>"
+ WaitSlot() ' NOOP
+end sub
+
+' -----------------------------------------------------------------------
+
+sub FeldbefehlAendernUndKontrollieren ( Selektion as Integer )
+
+ Dim Merk_dir_das as String
+
+ Call wTypeKeys "<Left>"
+ EditFields
+ Kontext "FeldbefehlBearbeitenDokument"
+ if ( FeldbefehlBearbeitenDokument.exists( 1 ) ) then
+ if Formatliste.IsVisible AND Formatliste.IsEnabled then
+ Formatliste.Select Selektion
+ Merk_dir_das=Formatliste.GetSelText
+ else
+ if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then
+ Zahlenformat.Select Selektion
+ Merk_dir_das=Zahlenformat.GetSelText
+ else
+ Auswahl.Select 2
+ end if
+ end if
+ FeldbefehlBearbeitenDokument.OK
+ else
+ warnlog( "Dialog <FeldbefehlBearbeitenDokument> not available" )
+ endif
+
+ EditFields
+ Kontext "FeldbefehlBearbeitenDokument"
+ if ( FeldbefehlBearbeitenDokument.exists( 1 ) ) then
+ if Formatliste.IsVisible AND Formatliste.IsEnabled then
+ if Formatliste.GetSelText <> Merk_dir_das then Warnlog "Changing the field has not been worked. Format " + Merk_dir_das + " Is : Format " + Formatliste.GetSelText
+ else
+ if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then
+ if Zahlenformat.GetSelText <> Merk_dir_das then Warnlog "Changing the field has not been worked. Format " + Merk_dir_das + " Is : Format " + Zahlenformat.GetSelText
+ else
+ if Auswahl.GetSelIndex <> 2 then Warnlog "Changing the field has not been worked."
+ end if
+ end if
+ FeldbefehlBearbeitenDokument.OK
+ else
+ warnlog( "Dialog <FeldbefehlBearbeitenDokument> not available" )
+ endif
+ Call wTypeKeys "<End>"
+ WaitSlot() ' NOOP
+ Call wTypeKeys "<Return>"
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hEinfuegenFloatingFrame
+
+ InsertFloatingFrame
+ Kontext "TabEigenschaften"
+ FrameName.SetText "Hallo"
+ Inhalt.SetText ConvertPath ( gTesttoolpath + "input\desktop\frameset.htm" )
+ TabEigenschaften.OK
+ Sleep 10
+
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hEinfuegenRahmen
+ InsertFrame
+ Kontext
+ Active.SetPage TabType
+ Kontext "TabType"
+ TabType.OK
+ Sleep 3
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hEinfuegenChart
+ InsertObjectChart
+ Kontext "AutoformatDiagramm1"
+ Fertigstellen.Click
+ WaitSlot() ' NOOP
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hLegendeEinfugen
+ Kontext "Toolbar"
+ Zeichnen.TearOff
+ Kontext "Drawbar"
+ Sleep 2
+ Legende.Click
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown 20, 20
+ DocumentWriter.MouseMove 40, 40
+ DocumentWriter.MouseUp 40, 40
+ Kontext "Drawbar"
+ Drawbar.Close
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wWriterKickBoxAway
+ ' Call this routine if you don't expect a messagebox
+ ' expect on an error. Closes messagebox and gives a Warnlog
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ try
+ Active.Ok
+ catch
+ Active.Yes
+ endcatch
+ end if
+ end if
+end sub
+
+'----------------------------------------------------------------
+
+sub tCheckAutotextInGroup(NumberOff as integer, NumberVariant as integer)
+ Dim j as integer
+ for j = 1 to NumberOff
+ Liste.Select j + NumberVariant
+ printlog "- " & Liste.GetSelText
+ Wait 500
+ try
+ AutoText.Ok
+ Wait 100
+ Kontext "Active" ' Messagebox bei Basic-Fehler
+ if Active.Exists then
+ Warnlog Active.Gettext + "Group " + NumberVariant + " Entry " + j
+ Active.Ok
+ end if
+ wait 500
+ Kontext "Eingabefeld"
+ if Eingabefeld.Exists then Eingabefeld.Cancel
+ wait 500
+ Call wTypeKeys "<Mod1 a>"
+ EditCopy
+ if GetClipboard = "" then Warnlog "No autotext inserted. Variant: "+ NumberVariant + " " + j
+ catch
+ Warnlog "Variant "+ NumberVariant + " " + j +" has a Problem."
+ endcatch
+ Call wTypeKeys "<Delete>" ' only text
+ Call wMarkObjects(TRUE)
+ EditAutotext
+ Kontext "Active"
+ if active.Exists then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ Kontext "AutoText"
+ if not Vorschau_anzeigen.IsChecked then Warnlog "Preview isn't checked anymore!"
+ next j
+end sub
+
+'----------------------------------------------------------------
+
+sub hMalZeichnenMitSelektion ( xS, yS, xE, yE )
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown ( xS, yS )
+ DocumentWriter.MouseMove ( xE, yE )
+ DocumentWriter.MouseUp ( xE, yE )
+
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.MouseDown ( xS, yS )
+ DocumentWriterWeb.MouseMove ( xE, yE )
+ DocumentWriterWeb.MouseUp ( xE, yE )
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.MouseDown ( xS, yS )
+ DocumentMasterDoc.MouseMove ( xE, yE )
+ DocumentMasterDoc.MouseUp ( xE, yE )
+
+ end select
+ WaitSlot() ' NOOP
+end sub
+
+'----------------------------------------------------------------
+
+sub hMalZeichnen ( xS, yS, xE, yE )
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown ( xS, yS )
+ DocumentWriter.MouseMove ( xE, yE )
+ DocumentWriter.MouseUp ( xE, yE )
+ WaitSlot() ' NOOP
+ if DocumentWriter.IsEnabled then Call wTypeKeys "<Escape>"
+
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.MouseDown ( xS, yS )
+ DocumentWriterWeb.MouseMove ( xE, yE )
+ DocumentWriterWeb.MouseUp ( xE, yE )
+ WaitSlot() ' NOOP
+ if DocumentWriterWeb.IsEnabled then DocumentWriterWeb.TypeKeys "<Escape>"
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.MouseDown ( xS, yS )
+ DocumentMasterDoc.MouseMove ( xE, yE )
+ DocumentMasterDoc.MouseUp ( xE, yE )
+ WaitSlot() ' NOOP
+ if DocumentMasterDoc.IsEnabled then DocumentMasterDoc.TypeKeys "<Escape>"
+
+ end select
+end sub
+
+'----------------------------------------------------------------
+
+sub sMenufunktionen(Fuer_Was as string)
+ Dim i as integer
+
+ Kontext "FormControls"
+ Sleep 3
+ for i = 1 to 20
+ if ControlProperties.IsEnabled then
+ ControlProperties.Click ' Formularfunktion über Toolbox abschalten
+ i=21
+ else
+ Sleep 1
+ if i >= 20 then
+ if gPlatform = "osx" then
+ Warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything"
+ else
+ Warnlog "Button (" + i + ")" + Fuer_Was + " is disabled "
+ end if
+ end if
+ end if
+ next i
+
+ Kontext
+ try
+ FormatControl
+ WaitSlot()
+
+ Kontext "ControlPropertiesDialog"
+ if ControlPropertiesDialog.Exists( 2 ) then
+ ControlPropertiesDialog.Close
+ ControlPropertiesDialog.notExists( 2 )
+ else
+ FormatControl
+ Wait 500
+ Kontext "ControlPropertiesDialog"
+ if ControlPropertiesDialog.Exists( 2 ) then
+ ControlPropertiesDialog.Close
+ ControlPropertiesDialog.notExists( 2 )
+ else
+ Warnlog " - Controlfieldproperties "+ Fuer_Was +" from Menu not available!"
+ end if
+ end if
+ printlog Fuer_Was
+ catch
+ if gPlatform = "osx" then
+ Warnlog "#i82427#-Mac OS X (Aqua): Drawing function does not draw anything"
+ else
+ Warnlog " - Controlfieldproperties "+ Fuer_Was +" from Menu not available!"
+ end if
+ endcatch
+
+ Call wTypeKeys "<Escape>"
+ Kontext "FormControls"
+end sub
+
+'----------------------------------------------------------------
+
+sub sAutopilot_Groupelement
+ Kontext "AutopilotGroupelement"
+ if AutopilotGroupelement.Exists then
+ printlog " -Autopilot-Group-Box Page 1"
+ Kontext "TabGroupBoxData"
+ Call DialogTest ( TabGroupBoxData )
+ Names.Settext "Optionsfeld 1"
+ if AddTo.IsEnabled then
+ AddTo.Click
+ else
+ Warnlog "Entry couldn't be overtaken in 1st Window of the Group Box-Autopilot!"
+ Kontext "AutopilotGroupelement"
+ CancelButton.Click
+ end if
+ Sleep 3
+ Kontext "AutopilotGroupelement"
+ if NextButton.IsEnabled then
+ NextButton.Click
+ else
+ Warnlog "In 1st Window the 'Next'-button is disabled!"
+ CancelButton.Click
+ end if
+ Sleep 3
+ printlog " -Autopilot-Group-Box Page 2"
+ Kontext "TabDefaultFieldSelection"
+ Call DialogTest ( TabDefaultFieldSelection )
+ Kontext "AutopilotGroupelement"
+ if NextButton.IsEnabled then
+ NextButton.Click
+ else
+ Warnlog "In 2nd Window the 'Next'-button is disabled!!"
+ AutopilotGroupelement.Cancel
+ end if
+ Sleep 3
+ printlog " -Autopilot-Group-Box Page 3"
+ Kontext "TabDatabaseValues"
+ Call DialogTest ( TabDatabaseValues )
+ Kontext "AutopilotGroupelement"
+ if NextButton.IsEnabled then
+ NextButton.Click
+ else
+ Warnlog "In 3rd Window the 'Next'-button is disabled!"
+ AutopilotGroupelement.Cancel
+ end if
+ Sleep 3
+ printlog " -Autopilot-Group-Box Page 4"
+ Kontext "TabCreateOptionGroup"
+ Call DialogTest ( TabCreateOptionGroup )
+ Kontext "AutopilotGroupelement"
+ if CreateButton.IsEnabled then
+ CreateButton.Click
+ else
+ Warnlog "In 4th Window the 'Create'-button is disabled!"
+ AutopilotGroupelement.Cancel
+ end if
+ else
+ Warnlog "- Autopilot for Group Box didn't appear!"
+ end if
+ Sleep 2
+end sub
+
+'----------------------------------------------------------------
+
+sub sAutopilot_ListboxCombobox(WhichBox as String)
+ Kontext "AutoPilotListComboBox"
+ if AutoPilotListComboBox.Exists then
+ printlog " -Autopilot-Listbox Page 1"
+ Kontext "TabListBoxData"
+ if TabListboxData.Exists then
+ Call DialogTest( TabListBoxData )
+ DataSource.Select 1
+ if Table.GetItemCount > 0 then
+ Table.Select 1
+ else
+ Kontext "Messagebox"
+ Do
+ if Messagebox.Exists then
+ Warnlog Messagebox.Gettext
+ Messagebox.Ok
+ else
+ Warnlog "No table selectable!"
+ exit do
+ end if
+ Loop
+ Kontext "AutoPilotListComboBox"
+ CancelButton.Click
+ exit sub
+ end if
+ end if
+ Sleep 5
+ Kontext "AutoPilotListComboBox"
+ if NextButton.IsEnabled then
+ NextButton.Click
+ printlog " -Autopilot-Listbox Page 2"
+ Kontext "TabTableSelection"
+ Call DialogTest ( TabTableSelection )
+ if TableSelection.GetItemCount > 0 then
+ TableSelection.Select 1
+ Kontext "AutoPilotListComboBox"
+ if NextButton.IsEnabled then
+ NextButton.Click
+ printlog " -Autopilot-Listbox Page 3"
+ Kontext "TabFieldSelection"
+ Call DialogTest ( TabFieldSelection )
+ ExistingFields.Select 1
+ Kontext "AutoPilotListComboBox"
+ if NextButton.IsEnabled then
+ NextButton.Click
+ Select Case Ucase(WhichBox)
+ Case "LISTBOX"
+ printlog " -Autopilot-Listbox Page 4"
+ Kontext "TabFieldLink"
+ Call DialogTest ( TabFieldLink )
+ Case "COMBO"
+ Kontext "TabDatabaseField"
+ Call DialogTest ( TabDatabaseField )
+ end select
+ Kontext "AutoPilotListComboBox"
+ CancelButton.Click
+ else
+ Warnlog "Next-Button on 3rd Tabpage disabled!"
+ CancelButton.Click
+ exit sub
+ end if
+ else
+ Warnlog "Next-Button on Second Tabpage disabled!"
+ CancelButton.Click
+ exit sub
+ end if
+ else
+ Warnlog "Unable to select table on second tabpage!"
+ CancelButton.Click
+ exit sub
+ end if
+ else
+ Warnlog "Next-Button on first Tabpage disabled!"
+ CancelButton.Click
+ Exit sub
+ end if
+ else
+ Warnlog "Autopilot is not up!"
+ end if
+end sub
+
+'----------------------------------------------------------------
+
+sub sAutopilotTableElement
+ Kontext "AutopilotTableElement"
+ if AutopilotTableElement.Exists then
+ Call DialogTest ( AutopilotTableElement )
+ Kontext "TabListBoxData"
+ if TabListboxData.Exists then
+ Call DialogTest( TabListBoxData )
+ DataSource.Select 1
+ if Table.GetItemCount > 0 then
+ Table.Select 1
+ else
+ Kontext "Messagebox"
+ if Messagebox.Exists then
+ Warnlog Messagebox.Gettext
+ Messagebox.Ok
+ else
+ Warnlog "No table selectable!"
+ end if
+ Kontext "AutopilotTableElement"
+ CancelButton.Click
+ exit sub
+ end if
+ end if
+ Kontext "AutopilotTableElement"
+ CancelButton.Click
+ else
+ Warnlog "Autopilot Table Element is not up"
+ end if
+end sub
+
+' *****************************************************
+' ************* Subroutines for Fields ****************
+' *****************************************************
+
+function uTabDokument as Integer
+ Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen
+ Dim Zaehler
+ Dim AlterWert as String : Dim Naechster as String
+
+ printlog " - Tabpage Document"
+ try
+ Kontext
+ Active.SetPage TabDokumentFeldbefehle
+ Kontext "TabDokumentFeldbefehle"
+ for i=1 to Feldtyp.GetItemCount
+ Feldtyp.Select i
+ Sleep 1
+ if Formatliste.IsVisible then
+ if Formatliste.IsEnabled then
+ if Auswahl.IsEnabled then
+ for j=1 to Auswahl.GetItemCount
+ Auswahl.Select j
+ for k=1 to Formatliste.GetItemCount
+ Formatliste.Select k
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ next k
+ k=0
+ next j
+ j=0
+ else
+ for k=1 to Formatliste.GetItemCount
+ Formatliste.Select k
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ next k
+ k=0
+ end if
+ else
+ if Auswahl.IsEnabled then
+ for j=1 to Auswahl.GetItemCount
+ Auswahl.Select j
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ next j
+ j=0
+ end if
+ end if
+ else
+ if Zahlenformat.IsEnabled then
+ if Auswahl.IsEnabled then
+ for j=1 to Auswahl.GetItemCount
+ Auswahl.Select j
+ for k=1 to Zahlenformat.GetItemCount
+ Zahlenformat.Select k
+ BeseitigeTabZahlen
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ next k
+ k=0
+ next j
+ j=0
+ else
+ for k=1 to Zahlenformat.GetItemCount
+ Zahlenformat.Select k
+ BeseitigeTabZahlen
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ next k
+ k=0
+ end if
+ else
+ if Auswahl.IsEnabled then
+ for j=1 to Auswahl.GetItemCount
+ Auswahl.Select j
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ next j
+ j=0
+ end if
+ end if
+ end if
+ Sleep 1
+ next i
+ printlog " here are " + Zaehler + " Fields selectable"
+ catch
+ Exceptlog
+ Warnlog "Tabpage Document: Error in variant " + i + " " + j + " " + k
+ endcatch
+ uTabDokument = Zaehler
+end function
+
+' -----------------------------------------------------------------------
+
+function uTabReferenzen as Integer
+ Dim i : Dim Zaehler
+
+ printlog " - Tabpage Reference"
+ try
+ Zaehler = 0 : i=0
+ Kontext
+ Active.SetPage TabReferenzen
+ Kontext "TabReferenzen"
+ if NOT NameFeld.IsEnabled then Feldtyp.Select 2
+ NameFeld.SetText "Testtool"
+ TabReferenzen.OK
+ Feldtyp.Select 1
+ if NameFeld.IsEnabled then Feldtyp.Select 2
+ for i=1 to Formatliste.GetItemCount
+ Formatliste.Select i
+ Zaehler=Zaehler+1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ Sleep 1
+ next i
+ printlog " - here are " + Zaehler + " Fields selectable"
+ catch
+ Exceptlog
+ Warnlog "Tabpage References: Error in Listentry Type " + i
+ endcatch
+ uTabReferenzen = Zaehler
+end function
+
+' -----------------------------------------------------------------------
+
+function uTabFunktionen as Integer
+ Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen
+ Dim Zaehler, x as integer
+ Dim weiter as Boolean
+ Dim AlterWert as String : Dim Naechster as String
+
+ printlog " - Tabpage Function"
+ try
+ Zaehler = 0 : i=0 : j=0 : k= 0
+ Kontext
+ Active.SetPage TabFunktionen
+ Kontext "TabFunktionen"
+ for i=1 to Feldtyp.GetItemCount
+ Feldtyp.Select i
+ weiter = TRUE
+ if Formatliste.IsVisible AND Formatliste.IsEnabled then
+ for j=1 to FormatListe.GetItemCount
+ FormatListe.Select j
+ Platzhalter.SetText "Ein"
+ Hinweis.SetText "Test"
+ Zaehler=Zaehler+1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ weiter = FALSE
+ next j
+ j=0
+ else
+ if Dann.IsVisible AND Dann.IsEnabled then
+ Bedingung.SetText "Hallo"
+ Dann.SetText "Ein"
+ Sonst.SetText "Test"
+ Zaehler=Zaehler+1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ weiter = FALSE
+ end if
+
+ if weiter = TRUE then
+ if ( Hinweis.IsVisible AND Hinweis.IsEnabled ) AND NOT Namefeld.IsEnabled then
+ Hinweis.SetText "Testtool"
+ Zaehler=Zaehler+1
+ Einfuegen.Click
+ Kontext "Eingabefeld"
+ if Eingabefeld.Exists then
+ Eingabefeld.OK
+ else
+ Warnlog "The textfield is missing in Variant " + i + " " + j + " " + k + " !"
+ end if
+ Kontext "TabFunktionen"
+ weiter = FALSE
+ end if
+ end if
+
+ if weiter = TRUE then
+ if MakroButton.IsEnabled then
+ MakroButton.Click
+ ' if no JRE is installed a messagebox appears
+ Do
+ x = x + 1
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if x = 1 then Warnlog Active.Gettext
+ Active.Ok
+ else
+ exit do
+ end if
+ else
+ exit do
+ end if
+ Loop
+ Kontext "Makro"
+ if Ausfuehren.IsEnabled then
+ Ausfuehren.Click
+ else
+ Makro.Cancel
+ end if
+ Kontext "TabFunktionen"
+ Zaehler=Zaehler+1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ weiter = FALSE
+ end if
+ end if
+
+ if weiter = TRUE then
+ if Bedingung.IsEnabled AND TextEinfuegen.IsEnabled then
+ Bedingung.SetText "Ein"
+ TextEinfuegen.SetText "Test"
+ Zaehler=Zaehler+1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ weiter = FALSE
+ end if
+ end if
+
+ if weiter = TRUE then
+ if Bedingung.IsEnabled AND NOT Wert.IsEnabled then
+ Bedingung.SetText "Ein Test"
+ Zaehler=Zaehler+1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ weiter = FALSE
+ end if
+ end if
+ end if
+ Sleep 1
+ next i
+ printlog " - here are " + Zaehler + " Fields selectable"
+ catch
+ Exceptlog
+ Warnlog "Tabpage Functions: Error in entry type " + i + " " + j
+ endcatch
+ uTabFunktionen = Zaehler
+end function
+
+' -----------------------------------------------------------------------
+
+function uTabDokumentinfo as Integer
+ Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen
+ Dim Zaehler
+ Dim AlterWert as String : Dim Naechster as String
+
+ printlog " - Tabpage DocInformation"
+ try
+ Zaehler = 0 : i=0 : j=0 : k= 0
+ Kontext
+ Active.SetPage TabDokumentInfoFeldbefehle
+ Kontext "TabDokumentInfoFeldbefehle"
+
+ for i=1 to 20
+ AlterWert = Feldtyp.GetText
+ Feldtyp.TypeKeys "<Down>"
+ Naechster = Feldtyp.GetText
+ Feldtyp.TypeKeys "<Up>"
+ Feldtyp.TypeKeys "<Add>"
+ Feldtyp.TypeKeys "<Down>"
+ if Feldtyp.GetText <> Naechster then NichtMachen=i
+ Feldtyp.TypeKeys "<Up>"
+ Feldtyp.TypeKeys "<Down>"
+ if Feldtyp.GetText = AlterWert then
+ Ende = i
+ i=21
+ end if
+ Sleep 1
+ next i
+ Feldtyp.TypeKeys "<Up>", Ende+1
+
+ i=0
+ for i=1 to Ende ' Alle Feldtypen
+ Sleep 1
+ if Auswahl.IsEnabled then
+ for j=1 to Auswahl.GetItemCount
+ Auswahl.Select j
+ if Zahlenformat.IsEnabled then
+ for k=1 to Zahlenformat.GetItemCount
+ Zahlenformat.Select k
+ Zaehler = Zaehler + 1
+ Kontext "TabZahlen"
+ if TabZahlen.Exists then TabZahlen.Cancel
+ Kontext "TabDokumentinfoFeldbefehle"
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ next k
+ k=0
+ else
+ Zaehler = Zaehler + 1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ end if
+ next j
+ j=0
+ else
+ if Zahlenformat.IsEnabled then
+ for k=1 to Zahlenformat.GetItemCount
+ Zahlenformat.Select k
+ Zaehler = Zaehler + 1
+ Kontext "TabZahlen"
+ if TabZahlen.Exists then TabZahlen.Cancel
+ Kontext "TabDokumentinfoFeldbefehle"
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ next k
+ k=0
+ else
+ Zaehler = Zaehler + 1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ end if
+ end if
+ if i = NichtMachen-1 then
+ Feldtyp.TypeKeys "<Down><Down>"
+ else
+ Feldtyp.TypeKeys "<Down>"
+ end if
+ Sleep 1
+ next i
+ printlog " - here are " + Zaehler + " Fields selectable"
+ catch
+ Exceptlog
+ Warnlog "Tabpage Variables: Error on type entry " + i + " " + j + " " + k
+ endcatch
+ uTabDokumentinfo = Zaehler
+end function
+
+' -----------------------------------------------------------------------
+
+function uTabVariablen as Integer
+ Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen
+ Dim Zaehler
+ Dim AlterWert as String : Dim Naechster as String
+ printlog " - Tabpage Variables"
+
+ try
+ Zaehler = 0 : i=0 : j=0 : k=0
+ Kontext
+ Active.SetPage TabVariablen
+ Kontext "TabVariablen"
+
+ for i=1 to Feldtyp.GetItemCount
+ Feldtyp.Select i
+ if i=9 then
+ Feldtyp.TypeKeys "<Up>"
+ Feldtyp.TypeKeys "<Down>"
+ end if
+ if NameText.IsEnabled then NameText.SetText "Hallo"
+ if Wert.IsEnabled then Wert.SetText "189882"
+
+ if Auswahl.IsEnabled AND ( Formatliste.IsEnabled OR Zahlenformat.IsEnabled )then
+ for j=1 to Auswahl.GetItemCount
+ Auswahl.Select j
+ if FormatListe.IsVisible AND FormatListe.IsEnabled then
+ for k=1 to Formatliste.GetItemCount
+ Formatliste.Select k
+ Zaehler = Zaehler + 1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ next k
+ k=0
+ else
+ if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then
+ for k=1 to Zahlenformat.GetItemCount
+ Zahlenformat.Select k
+ Zaehler = Zaehler + 1
+ Kontext "TabZahlen"
+ if TabZahlen.Exists then TabZahlen.OK
+ Kontext "TabVariablen"
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ Kontext "Eingabefeld"
+ if Eingabefeld.Exists then Eingabefeld.OK
+ Kontext "TabVariablen"
+ next k
+ k=0
+ end if
+ end if
+ next j
+ j=0
+ else
+ if FormatListe.IsVisible AND FormatListe.IsEnabled then
+ for k=1 to Formatliste.GetItemCount
+ Formatliste.Select k
+ Zaehler = Zaehler + 1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ Kontext "TabZahlen"
+ if TabZahlen.Exists then TabZahlen.OK
+ Kontext "TabVariablen"
+ next k
+ k=0
+ else
+ if Zahlenformat.IsVisible AND Zahlenformat.IsEnabled then
+ for k=1 to Zahlenformat.GetItemCount
+ Zahlenformat.Select k
+ Zaehler = Zaehler + 1
+ Kontext "TabZahlen"
+ if TabZahlen.Exists then TabZahlen.OK
+ Kontext "TabVariablen"
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ Kontext "Eingabefeld"
+ if Eingabefeld.Exists then Eingabefeld.OK
+ Kontext "TabVariablen"
+ next k
+ k=0
+ end if
+ end if
+ end if
+ Sleep 1
+ next i
+ i=0
+ printlog " - here are " + Zaehler + " Fields selectable"
+ catch
+ Exceptlog
+ Warnlog "Tabpage Variables: Error on entry type" + i + " " + j + " " + k
+ endcatch
+ uTabVariablen = Zaehler
+end function
+
+' -----------------------------------------------------------------------
+
+function uTabDatenbank as Integer
+ Dim i : Dim j : Dim k : Dim Ende : Dim NichtMachen
+ Dim Zaehler
+ Dim AlterWert as String : Dim Naechster as String
+
+ printlog " - Tabpage Database"
+ try
+ Zaehler = 0 : i=0 : j=0 : k= 0
+ Kontext
+ Active.SetPage TabDatenbank
+ Kontext "TabDatenbank"
+
+ Datenbankauswahl.TypeKeys "<Up>", 5
+ for i=1 to Feldtyp.GetItemCount
+ j=0 : k=0
+ Feldtyp.Select i
+ if Satznummer.IsEnabled then Satznummer.SetText "Na_mal_sehen"
+ for j=1 to 20
+ AlterWert = Datenbankauswahl.GetText
+ if j=1 then
+ Datenbankauswahl.TypeKeys "<Add>"
+ Datenbankauswahl.TypeKeys "<Down>"
+ Datenbankauswahl.TypeKeys "<Add>"
+ Datenbankauswahl.TypeKeys "<Down>"
+ else
+ Datenbankauswahl.TypeKeys "<Down>"
+ end if
+ if Datenbankauswahl.GetText = AlterWert then
+ if j=1 then printlog "Address book contains no data"
+ j=21
+ else
+ if Selbstdefiniert.IsEnabled AND Selbstdefiniert.IsChecked then
+ for k=1 to Formatliste.GetItemCount
+ Formatliste.Select k
+ Zaehler = Zaehler + 1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ next k
+ else
+ Zaehler = Zaehler + 1
+ if Einfuegen.IsEnabled then Einfuegen.Click
+ end if
+ end if
+ next j
+ Datenbankauswahl.TypeKeys "<up>", 20
+ Sleep 1
+ next i
+
+ printlog " - here are " + Zaehler + " Fields selectable"
+ catch
+ Exceptlog
+ Warnlog "Tabpage Database: Error on field entry " + i + " " + j + " " + k
+ endcatch
+ uTabDatenbank = Zaehler
+end function
+
+' -----------------------------------------------------------------------
+
+sub BeseitigeTabZahlen
+ Kontext "TabZahlen"
+ if TabZahlen.Exists then TabZahlen.Cancel
+ Kontext "TabDokumentFeldbefehle"
+end sub
diff --git a/testautomation/writer/tools/includes/w_tool2.inc b/testautomation/writer/tools/includes/w_tool2.inc
new file mode 100644
index 000000000000..44e78fd589b4
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool2.inc
@@ -0,0 +1,423 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'* **
+'* owner : helge.delfs@sun.com **
+'* **
+'* short description : Description of file **
+'* **
+'*******************************************************************
+'* **
+' #1 OptionenAufrufen
+' #1 CheckUberpruefen
+' #1 UnCheckUeberpruefen
+' #1 WortErgaenzen
+'* **
+'\******************************************************************
+
+sub OptionenAufrufen(Seite as string)
+ Dim i as integer, GotItAlready as Boolean
+ Kontext
+ ToolsAutoCorrect
+ For i = 1 to 5
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if i = 1 then
+ Warnlog Active.Gettext + " Bug#90025"
+ GotItAlready = True
+ end if
+ Active.Ok
+ end if
+ end if
+ next i
+ Kontext
+ Select case Seite
+ case "TabErsetzung" : active.SetPage TabErsetzung
+ case "TabAusnahmen" : active.SetPage TabAusnahmen
+ case "TabOptionen" : active.SetPage TabOptionen
+ case "TabLocalizedOptions": active.SetPage TabLocalizedOptions
+ end select
+ for i = 1 to 5
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ if i = 1 and GotItAlready = False then Warnlog Active.Gettext + " Bug#90025"
+ Active.Ok
+ end if
+ end if
+ next i
+ Kontext Seite
+end sub
+
+
+
+sub CheckUberpruefen ( Pruefung$ )
+ Call wTypeKeys Pruefung$
+ wait 100
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+ if GetClipboardText = Pruefung$ then Warnlog "Text has not been replaced"
+ Call wTypeKeys "<Home><Shift End><Delete>"
+end sub
+
+sub UnCheckUeberpruefen ( Pruefung$ )
+ Call wTypeKeys Pruefung$
+ wait 100
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+ if GetClipboardText <> Pruefung$ then Warnlog "Text has been replaced"
+ Call wTypeKeys "<Home><Shift End><Delete>"
+end sub
+
+
+sub WortErgaenzen(Tastaturbefehl as string)
+ Call wTypeKeys "Die"
+ Wait 500
+ Call wTypeKeys Tastaturbefehl
+ Call wTypeKeys "<End><Mod1 Shift Left>"
+ EditCopy
+ if GetClipBoardtext = "Dies" then Warnlog "Word 'Dies' has been completed!"
+ if Tastaturbefehl = "<Return>" then Call wTypeKeys "<Return>"
+
+ Call wTypeKeys "auto"
+ Wait 500
+ Call wTypeKeys Tastaturbefehl
+ Call wTypeKeys "<End><Mod1 Shift Left>"
+ EditCopy
+ if GetClipBoardtext <> "automatischen" then Warnlog "Word 'automatischen' has not been completed!"
+ if Tastaturbefehl = "<Return>" then Call wTypeKeys "<Return>"
+
+ Call wTypeKeys "Wor"
+ Wait 500
+ Call wTypeKeys Tastaturbefehl
+ Call wTypeKeys "<End><Mod1 Shift Left>"
+ EditCopy
+ if GetClipBoardtext <> "Worterkennung" then Warnlog "Word 'Worterkennung' has not been completed!"
+ if Tastaturbefehl = "<Return>" then Call wTypeKeys "<Return>"
+
+end sub
+
+' -----------------------------------------------------------------------------
+
+function wCreateAutotextCategory(vCategoryName as string) as boolean
+ Dim i as integer, bCategoryExist as boolean
+ '/// This function creates an autotext-category
+ '/// requires CategoryName to create
+ '/// returns true if category could be created
+ '/// Attention: Autotext-Dialog leaves open after creating category
+ Kontext "Autotext"
+ if Not Autotext.Exists then EditAutotext
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ Kontext "Autotext"
+ try
+ Bereiche.Click
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+ catch
+ Warnlog "Button 'Categories' is disabled!"
+ exit function
+ endcatch
+
+ Kontext "BereicheBearbeitenAutotext"
+ if ( BereicheBearbeitenAutotext.Exists( 1 ) ) then
+
+ Liste.TypeKeys "<Home>"
+ For i = 1 to Liste.GetItemCount
+ if Liste.GetText = vCategoryName then
+ QAErrorlog "Category " & vCategoryName & " already existing"
+ bCategoryExist = true
+ exit for
+ end if
+ next i
+
+ if bCategoryExist = false then
+ for i = 1 to Pfad.GetItemCount
+ Pfad.Select i
+ Bereich.Settext vCategoryName
+ try
+ Neu.Click
+ exit for
+ catch
+ if i = Pfad.GetItemCount then
+ Warnlog "Unable to create new category"
+ BereicheBearbeitenAutotext.Close
+ exit function
+ end if
+ endcatch
+ next i
+
+ if Liste.GetText <> vCategoryName then
+ Warnlog "New category is not selected after creation"
+ try
+ Liste.Select vCategoryName
+ wCreateAutotextCategory = true
+ catch
+ exit function
+ endcatch
+ else
+ wCreateAutotextCategory = true
+ end if
+ else
+ wCreateAutotextCategory = true
+ end if
+
+ BereicheBearbeitenAutotext.Ok
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ else
+ warnlog( "Dialog <BereicheBearbeitenAutotext> is not available" )
+ endif
+
+end function
+
+' -----------------------------------------------------------------------------
+
+function wSelectAutotextCategory(vCategoryName as string) as boolean
+ Dim i as integer
+ '/// This function selects an autotext-category
+ '/// requires CategoryName to select
+ '/// returns true if category could be selected
+ '/// Attention: Autotext-Dialog leaves open after selecting category
+ Kontext "Autotext"
+ if Not Autotext.Exists then EditAutotext
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+ '/// close all categories
+ Kontext "Autotext"
+ Liste.Select 1
+ for i=1 to 10
+ Liste.TypeKeys "-"
+ Liste.TypeKeys "<Down>"
+ wait 500
+ next i
+
+ Liste.TypeKeys "<Home>"
+ for i=1 to 10
+ if Liste.Gettext <> vCategoryName then
+ Liste.TypeKeys "<Down>"
+ wait 500
+ end if
+ next i
+
+ if Liste.Gettext = vCategoryName then wSelectAutotextCategory = true
+
+end function
+
+' -----------------------------------------------------------------------------
+
+function wDeleteAutotextCategory(vCategoryName as string) as boolean
+ Dim i as integer
+ '/// This function deletes an autotext-category
+ '/// requires CategoryName to delete
+ '/// returns true if category could be deleted
+ '/// Attention: Autotext-Dialog leaves open after deleting category
+ Kontext "Autotext"
+ if Not Autotext.Exists then EditAutotext
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ Kontext "Autotext"
+ try
+ Bereiche.Click
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ catch
+ Warnlog "Button 'Categories' is disabled!"
+ exit function
+ endcatch
+
+ wait 500
+ Kontext "BereicheBearbeitenAutotext"
+ if Not BereicheBearbeitenAutotext.Exists then exit function
+
+ Liste.TypeKeys "<Home>"
+ for i=1 to 10
+ if Liste.Gettext <> vCategoryName then
+ Liste.TypeKeys "<Down>"
+ wait 500
+ end if
+ next i
+
+ if Liste.Gettext = vCategoryName then
+ try
+ Loeschen.Click
+ catch
+ exit function
+ BereicheBearbeitenAutotext.Close
+ endcatch
+ end if
+ BereicheBearbeitenAutotext.Ok
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Yes
+ wDeleteAutotextCategory = true
+ Sleep 1
+ catch
+ Active.Ok
+ endcatch
+ end if
+ end if
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+end function
+
+'----------------------------------------------------------------------
+
+function wDeleteAutotext(vAutotextName as string) as boolean
+ '/// This function deletes an autotext
+ '/// requires AutotextName to delete
+ '/// returns true if Autotext could be deleted
+ '/// Attention: Autotext-Dialog leaves open after deleting autotext
+
+ Dim j as integer
+ Dim ik as integer
+ Dim bDeleted as boolean
+ Dim sAllGroups as integer
+ Dim sAllInGroups as integer
+
+ Kontext "Autotext"
+ if Not Autotext.Exists then EditAutotext
+
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ QAErrorlog Active.Gettext
+ Active.Ok
+ end if
+ end if
+
+ Kontext "Autotext"
+ Liste.Select 1
+ for j=1 to 10
+ Liste.TypeKeys "-"
+ Liste.TypeKeys "<Down>"
+ wait 500
+ next j
+
+ bDeleted = false
+ ' count all groups
+ sAllGroups = Liste.GetItemCount
+ ' travel through all groups
+ For ik = 1 to sAllGroups
+ Liste.Select ik
+ Liste.TypeKeys "+"
+
+ sAllInGroups = Liste.GetItemCount - sAllGroups
+ For j = 1 to sAllInGroups
+ Liste.TypeKeys "<Down>"
+ if Liste.Gettext = vAutotextName then
+ try
+ Menue.Click
+ wait 500
+ Call hMenuSelectNr ( 3 )
+ Kontext "Active"
+ if Active.Exists and Active.GetRT = 304 then
+ Active.yes
+ wDeleteAutotext = true
+ else
+ Warnlog "No messages to confirm deleting the Autotext!"
+ end if
+ bDeleted = true
+ exit for
+ catch
+ Warnlog "Menu Autotext->'Delete' disabled ! Test failed !"
+ endcatch
+ end if
+ next j
+ if bDeleted = true then exit for
+ ' close group
+ Liste.Select ik
+ Liste.TypeKeys "-"
+ next ik
+
+end function
+
+
+sub wChangeDefaultView()
+
+ ' #i107038: This code forces the writer to display one page only which is
+ ' zoomed to pagewidth, filling the entire - previously maximized - window.
+ ' This is required because the VCL Testtool might eventually draw objects
+ ' outside the document window depending on display size
+
+ Call hNewDocument
+ ViewZoom
+ Kontext "Massstab"
+ Vergroesserung100.check
+ Singlepage.check
+ Massstab.Ok
+ Call hCloseDocument
+
+end sub \ No newline at end of file
diff --git a/testautomation/writer/tools/includes/w_tool3.inc b/testautomation/writer/tools/includes/w_tool3.inc
new file mode 100644
index 000000000000..8be27ca7bc3c
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool3.inc
@@ -0,0 +1,643 @@
+'*******************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Description of file
+'*
+'\******************************************************************************
+
+sub InTabelleKontrollieren
+ Call wTypeKeys ("<Home>")
+ Call wTypeKeys ("<Tab><Shift End>")
+ EditCopy
+ if GetClipBoardText <> "Text" then
+ Warnlog "Text has not been inserted in a table"
+ else
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<Shift End>"
+ end if
+end sub
+
+' ****
+sub InTabelleKontrollierenExtra
+ Call wTypeKeys ("<Home><Shift Tab><Shift End>")
+ EditCopy
+ if GetClipBoardText <> "Der" then
+ Warnlog "Text has not been inserted in a table"
+ else
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<Shift End>"
+ end if
+end sub
+
+'***
+sub InTextKontrollieren
+ Call wTypeKeys ("<Home><Shift Mod1 Right>")
+ EditCopy
+ if Left$(GetClipBoardText,3) <> "Der" AND Left$(GetClipboardText,4) <> "Der " then
+ Warnlog "Table has not been changed to text"
+ else
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<Shift End>"
+ end if
+end sub
+
+'***
+sub AufsteigendKontrollieren ( Zahl as Boolean )
+ Call wTypeKeys "<Home><Up>",6
+ wait 500
+ Call wTypeKeys ("<Home><Shift End>" )
+ hUseAsyncSlot( "EditCopy" )
+ if Zahl = TRUE then
+ if GetClipboardText <> "23" then Warnlog "1. Number not correctly sorted"
+ else
+ if GetClipboardText <> "Ahallo" then Warnlog "1. Word is not correctly sorted"
+ end if
+ Call wTypeKeys ( "<Down><Down><Home><Shift End>" )
+ hUseAsyncSlot( "EditCopy" )
+ if Zahl = TRUE then
+ if GetClipboardText <> "54" then Warnlog "3. Number not correctly sorted"
+ else
+ if GetClipboardText <> "Ohallo" then Warnlog "3. Word not correctly sorted"
+ end if
+ Call wTypeKeys ( "<Down><Down><Home><Shift End>" )
+ hUseAsyncSlot( "EditCopy" )
+ if Zahl = TRUE then
+ if GetClipboardText <> "65" then Warnlog "Last number is not correctly sorted"
+ else
+ if GetClipboardText <> "Zhallo" then Warnlog "Last word is not correctly sorted"
+ end if
+end sub
+
+'***
+sub AbsteigendKontrollieren ( Zahl as Boolean )
+ Call wTypeKeys "<Home><Up>",6
+ wait 500
+ Call wTypeKeys ( "<Home><Shift End>" )
+ hUseAsyncSlot( "EditCopy" )
+ if Zahl = TRUE then
+ if GetClipboardText <> "65" then Warnlog "1. Number not correctly sorted"
+ else
+ if GetClipboardText <> "Zhallo" then Warnlog "1. word not correctly sorted"
+ end if
+ Call wTypeKeys ( "<Down><Down><Down><Home><Shift End>" )
+ hUseAsyncSlot( "EditCopy" )
+ if Zahl = TRUE then
+ if GetClipboardText <> "43" then Warnlog "4th number not correctly sorted"
+ else
+ if GetClipboardText <> "Ghallo" then Warnlog "4th word not correctly sorted"
+ end if
+ Call wTypeKeys ( "<Down><Home><Shift End>" )
+ hUseAsyncSlot( "EditCopy" )
+ if Zahl = TRUE then
+ if GetClipboardText <> "23" then Warnlog "Wrong sort: last number. Should => "+"Ohallo"+" Is =>"+GetClipboardText
+ else
+ if GetClipboardText <> "Ahallo" then Warnlog "Wrong sort: last word. Should => "+"Ohallo"+" Is =>"+GetClipboardText
+ end if
+end sub
+
+'***
+sub AufSortierungPruefen(i as integer)
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<up>",6
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Right><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/1.Row incorrect"
+ if i <> 1 then
+ Call wTypeKeys "<Mod1 Right>", 3
+ else
+ Call wTypeKeys "<Mod1 Right>"
+ end if
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 2.Column/1.Row incorrect"
+ Call wTypeKeys "<Down><Home>"
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Home><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 1.Column/2.Row incorrect"
+ if i <> 1 then
+ Call wTypeKeys "<Mod1 Right>", 3
+ else
+ Call wTypeKeys "<Mod1 Right>"
+ end if
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Right><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "DDD" then Warnlog "Entry in 2.Column/2.Row incorrect"
+ Call wTypeKeys "<Down><Home>"
+ if i <> 1 then
+ Call wTypeKeys "<Mod1 Right>", 10
+ else
+ Call wTypeKeys "<Mod1 Right>", 5
+ end if
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Right><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 4.Column/3.Row incorrect"
+end sub
+
+'***
+sub AbSortierungPruefen(i as integer)
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<up>", 6
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Right><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/1.Row incorrect"
+ Call wTypeKeys "<Down><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Home><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "CCC" then Warnlog "Entry in 1.Column/2.Row incorrect"
+ if i <> 1 then
+ Call wTypeKeys "<Mod1 Right>" , 4
+ else
+ Call wTypeKeys "<Mod1 Right>" , 2
+ end if
+ Call wTypeKeys "<Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<MOD1 Left>", 2
+ Call wTypeKeys "<Shift MOD1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "BBB" then Warnlog "Entry in 2.Column/2.Row incorrect"
+ Call wTypeKeys "<Left><Up>"
+ Call wTypeKeys "<Right>"
+ Call wTypeKeys "<Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Right><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "EEE" then Warnlog "Entry in 2.Column/1.Row incorrect"
+ if i <> 1 then
+ Call wTypeKeys "<Mod1 Right>", 6
+ Call wTypeKeys "<Down>", 3
+ Call wTypeKeys "<End><Shift Mod1 Left>"
+ else
+ Call wTypeKeys "<Mod1 Right>", 3
+ Call wTypeKeys "<Down>", 3
+ Call wTypeKeys "<Shift Mod1 Right>"
+ end if
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Trennzeichen then
+ QaErrorLog "#i94661# - Marked the Separator-Sign, correcting now."
+ Call wTypeKeys "<Right><Shift Mod1 Right>"
+ EditCopy
+ end if
+ if Left$(GetClipboardText,3) <> "AAA" then Warnlog "Entry in 2.Column/1.Row incorrect"
+end sub
+
+'***
+sub UndoRichtigBeiSortierung
+ Dim Fehler as Boolean
+ Call wTypeKeys "<Left Right>"
+ wait 100
+ EditUndo
+ Sleep 1
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<up>", 6
+ Call wTypeKeys "<Shift Mod1 Right>"
+ EditCopy
+ if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE
+ Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE
+ Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE
+ Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if Left$(GetClipboardText,3) <> "AAA" then Fehler = TRUE
+ Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if Left$(GetClipboardText,3) <> "BBB" then Fehler = TRUE
+ Call wTypeKeys "<Down><Home><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if Left$(GetClipboardText,3) <> "CCC" then Fehler = TRUE
+ if Fehler = TRUE then
+ Warnlog "Undo after sorting has not been functioned correctly"
+ Call hCloseDocument
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\st1_5.sdw" )
+ end if
+ Call wTypeKeys "<End>"
+ Call wTypeKeys "<Down>",6
+ Call wTypeKeys "<Mod1 a>"
+ wait 100
+end sub
+
+'***
+sub TrennzeichenSetzen ( Trennstring as String )
+ EditSearchAndReplace
+ Kontext "FindAndReplace"
+ if FindAndReplace.NotExists then EditSearchAndReplace
+ Kontext "FindAndReplace"
+ if Not RegularExpressions.IsVisible then More.Click
+ Select Case Trennstring
+ Case ";"
+ RegularExpressions.Check
+ SearchFor.SetText "\t"
+
+ Case "|"
+ RegularExpressions.Check
+ SearchFor.SetText "\t"
+
+ end select
+
+ ReplaceWith.SetText TrennString
+ ReplaceAll.Click
+
+ Kontext
+ if MessageBox.Exists then
+ if InStr( MessageBox.GetText, "30" ) = 0 then
+ MessageBox.OK
+ Kontext "FindAndReplace"
+ RegularExpressions.Check
+ SearchFor.SetText "\t"
+ ReplaceWith.SetText TrennString
+ ReplaceAll.Click
+ Sleep 1
+ Kontext
+ if MessageBox.Exists then
+ if InStr( MessageBox.GetText, "30" ) = 0 then
+ MessageBox.OK
+ else
+ Warnlog "Unable to insert Character. Following test doesn't work!"
+ MessageBox.OK
+ end if
+ end if
+ else
+ MessageBox.OK
+ end if
+ end if
+ Kontext "FindAndReplace"
+ More.Click
+ if FindAndReplace.Exists then FindAndReplace.Close
+end sub
+
+'***
+function ZelleRuntertesten ( Wert$ ) as Boolean
+ Call wTypeKeys "<Down>"
+ Call wTypeKeys "<Mod1 a>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText = Wert$ then
+ ZelleRuntertesten = TRUE
+ else
+ ZelleRuntertesten = FALSE
+ end if
+end function
+
+'***
+
+sub wEinfuegenEintragAlle ( NaWieSollErheissen$ )
+ Call wTypeKeys NaWieSollErheissen$
+ Call wTypeKeys "<Mod1 Left><Shift Mod1 Right>"
+ InsertIndexesEntry
+ Kontext "VerzeichniseintragEinfuegen"
+ Verzeichnis.Select 1
+ VerzeichniseintragEinfuegen.OK
+
+ Call wTypeKeys "<End> "
+ Call wTypeKeys "<Left><Shift Mod1 Left>"
+ InsertIndexesEntry
+ Kontext "VerzeichniseintragEinfuegen"
+ Verzeichnis.Select 2
+ VerzeichniseintragEinfuegen.OK
+
+ Call wTypeKeys "<End> "
+ Call wTypeKeys "<Left><Left><Shift Mod1 Left>"
+ InsertIndexesEntry
+ Kontext "VerzeichniseintragEinfuegen"
+ Verzeichnis.Select 3
+ VerzeichniseintragEinfuegen.OK
+ Call wTypeKeys "<End> "
+end sub
+
+'***
+
+sub ReihenfolgePruefen
+ Dim sDummy$
+
+ printlog " - Checking entry's on first page"
+ Call wTypeKeys "<Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ sDummy$ = GetClipboardText
+ if sDummy$ <> "Zhallo" then
+ if sDummy$ <> "Ahallo" then
+ Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$
+ else
+ Warnlog "Sort infinitely is not in alphabetical order"
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ wait 100
+ EditCopy
+ if GetClipboardText <> "Zhallo" then Warnlog "2. entry not Zhallo but "+GetClipboardText
+ end if
+ else
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ wait 100
+ EditCopy
+ if GetClipboardText <> "Ahallo" then Warnlog "2. entry not Ahallo but "+GetClipboardText
+ end if
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Ghallo" then Warnlog "4. entry not Ghallo but "+GetClipboardText
+
+ printlog " - checking entrys on 3rd page"
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ sDummy$ = GetClipboardText
+ if sDummy$ <> "Zhallo" then
+ if sDummy$ <> "Ahallo" then
+ Warnlog "Wrong Sort: Should -> Zhallo Is -> "+ sDummy$
+ else
+ Warnlog "Sort infinitely is not in alphabetical order"
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ wait 100
+ EditCopy
+ if GetClipboardText <> "Zhallo" then Warnlog "6. entry not Zhallo but "+GetClipboardText
+ end if
+ else
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ wait 100
+ EditCopy
+ if GetClipboardText <> "Ahallo" then Warnlog "6. entry not Ahallo but "+GetClipboardText
+ end if
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Xhallo" then Warnlog "7. entry not Xhallo but "+GetClipboardText
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Ghallo" then Warnlog "8. entry not Ghallo but "+GetClipboardText
+
+ printlog " - checking page entrys"
+ Call wTypeKeys "<End><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "3" then Warnlog "8. Entry: Not page 3 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "3" then Warnlog "7. Entry: Not page 3 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "3" then Warnlog "6. entry: Not page 3 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "3" then Warnlog "5. entry: Not page 3 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1" then Warnlog "4. entry: Not page 1 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1" then Warnlog "3. entry: Not page 1 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1" then Warnlog "2. entry: Not page 1 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1" then Warnlog "1. entry: Not page 1 but "+ GetClipboardText
+ Call wTypeKeys "<End><Up><Shift Mod1 Left>"
+end sub
+
+'***
+sub ReihenfolgePruefen2
+ printlog " - checking entrys"
+ Call wTypeKeys "<Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Ahallo" then Warnlog "1. entry not Ahallo but "+GetClipboardText
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Ghallo" then Warnlog "2. entry not Ghallo but "+GetClipboardText
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Xhallo" then Warnlog "3. entry not Xhallo but "+GetClipboardText
+ Call wTypeKeys "<Home><Down><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Zhallo" then Warnlog "4. entry not Zhallo but "+GetClipboardText
+ Call wTypeKeys "<Down><Mod1 Left><Shift Mod1 Right>"
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "Bhallo " then Warnlog "Number of entrys more then 4."
+
+ printlog " - checking page entrys"
+ Call wTypeKeys "<Up>"
+ Call wTypeKeys "<Shift Mod1 Right>", 3
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1, 3" then Warnlog "4. entry: Not '1, 3' but "+ GetClipboardText
+ Call wTypeKeys "<Up>"
+ Call wTypeKeys "<Shift Mod1 Left>", 3
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1, 3" then Warnlog "3. entry: Not '1, 3' but "+ GetClipboardText
+ Call wTypeKeys "<Up>"
+ Call wTypeKeys "<Shift Mod1 Right>", 3
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1, 3" then Warnlog "2. entry: Not '1, 3' but "+ GetClipboardText
+ Call wTypeKeys "<Up>"
+ Call wTypeKeys "<Shift Mod1 Left>", 3
+ hUseAsyncSlot( "EditCopy" )
+ if GetClipboardText <> "1, 3" then Warnlog "1. entry: Not '1, 3' but "+ GetClipboardText
+end sub
+' ***
+function SchriftFormatTesten ( sName$ ) as String
+ SchriftFormatTesten = sName$
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ if FontWest.GetSelText <> sName then SchriftFormatTesten = FontWest.GetSelText
+ TabFont.OK
+end function
+
+' *******************************************************************
+
+function ErmittleErgebnis ( Ergebnis as String ) as Boolean
+ ErmittleErgebnis = TRUE
+ Kontext "DocumentWriter"
+ Call wTypeKeys "<End><Shift Home>"
+ EditCopy
+ Wait 500
+ if GetClipboardText <> Ergebnis then ErmittleErgebnis = FALSE
+end function
+
+' *******************************************************************
+
+sub VerzeichnisUeberNavigator(Welches as integer)
+ dim j as integer
+ Kontext "Navigator"
+ if Navigator.NotExists then ViewNavigator
+ Kontext "NavigatorWriter"
+ if Auswahlliste.GetItemCount<11 then Inhaltsansicht.Click
+
+ if Auswahlliste.GetItemCount >11 then
+ For j= 1 to 11
+ Auswahlliste.Select j
+ Auswahlliste.TypeKeys "-"
+ next j
+ end if
+
+ wait 500
+
+ Auswahlliste.Select 10
+ Auswahlliste.TypeKeys "+"
+ Auswahlliste.Select 10 + Welches
+ Auswahlliste.TypeKeys "<Return>"
+ Kontext "DocumentWriter"
+end sub
+
+'**********************************************************
+
+sub sZahlenformatfuerZelle
+ Kontext "DocumentWriter"
+ FormatNumberFormat
+ Kontext "Zahlenformat"
+ Kategorie.Select 3
+ KategorieFormat.Select 1
+ Zahlenformat.OK
+ Kontext "DocumentWriter"
+end sub
+
+'**********************************************************
+
+sub sNavigatorInBrauchbarenZustand
+ dim j as integer
+ Kontext "NavigatorWriter"
+ if NavigatorWriter.NotExists then ViewNavigator
+ if Auswahlliste.GetItemCount<11 then Inhaltsansicht.Click
+ Wait 500
+ if Auswahlliste.GetItemCount >11 then
+ For j= 1 to 11
+ Auswahlliste.Select j
+ Auswahlliste.TypeKeys "-"
+ next j
+ end if
+
+ Wait 500
+ Auswahlliste.Select 2
+ Auswahlliste.TypeKeys "+"
+ Inhaltsansicht.Click
+ Kontext "DocumentWriter"
+end sub
+
+'**********************************************************
+
+sub sZellinhaltInZwischenablage(VergleichDas as string,Aktion as string)
+ Call wTypeKeys "<Home><Shift End>"
+ EditCopy
+ if VergleichDas <> GetClipboardText then Warnlog "- Table has not been splitted correctly!(" + Aktion + ")"
+end sub
+
+'**********************************************************
+
+sub sSeiteMitBrauchbarerTabelleEinrichten
+ Call hTabelleEinfuegen
+ FormatTable
+ Kontext
+ Active.SetPage TabTabelle
+ Kontext "TabTabelle"
+ Tabellenname.Settext "MeineTabelle"
+ TabTabelle.OK
+
+ Call wTypeKeys "�berschrift 1"
+ Call wTypeKeys "<Down>"
+ Call wTypeKeys "Text 1"
+ Call wTypeKeys "<Down>"
+ wait 500
+ Call hTabelleEinfuegen
+ wait 500
+ Call wTypeKeys "�berschrift 2"
+ Call wTypeKeys "<Down>"
+ Call wTypeKeys "Text 2"
+ Call wTypeKeys "<Up>",1
+end sub
+
+'**********************************************************
+
+sub wOpenContextMenu ( optional FocusParam as boolean)
+ if IsMissing(FocusParam) = True then
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ Call DocumentMasterDoc.TypeKeys "<SHIFT F10>" 'OpenContextMenu
+
+ end select
+ else
+ if FocusParam = True then
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ Call DocumentWriter.OpenContextMenu true
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ Call DocumentMasterDoc.OpenContextMenu true
+
+ end select
+ else
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ Call DocumentWriter.OpenContextMenu
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ Call DocumentMasterDoc.OpenContextMenu
+ end select
+ end if
+ end if
+end sub
diff --git a/testautomation/writer/tools/includes/w_tool4.inc b/testautomation/writer/tools/includes/w_tool4.inc
new file mode 100644
index 000000000000..78cee6ca3042
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool4.inc
@@ -0,0 +1,210 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'* **
+'* owner : helge.delfs@sun.com **
+'* **
+'* short description : Misc tools for writer tests **
+'* **
+'*******************************************************************
+'* **
+' #1 CountItemsInNavigatorGroup(Group as integer) as Integer
+' #1 wCheckOutline
+' #1 wSetZoom
+' #1 wGetSpellcheckDocumentName
+' #1 wToolsSpellcheckCheckWriter
+' #1 wEnableAutoSpellcheck
+' #1 wEnableHyphenation
+'* **
+'\******************************************************************
+
+function CountItemsInNavigatorGroup(Group as integer) as Integer
+ Dim j as integer,SelectInNavigator as integer
+ 'First, select the Navigator depending on the application
+ Kontext "Navigator"
+ If Not Navigator.Exists then ViewNavigator
+ Kontext "NavigatorWriter"
+
+ 'In Navigator, close all groups and set focus to first group
+ Sleep 2
+ if Auswahlliste.GetItemCount<12 then Inhaltsansicht.Click
+ Wait 500
+ 'Close all groups in Navigator
+ if Auswahlliste.GetItemCount >12 then
+ For j= 1 to 12
+ Auswahlliste.Select j
+ Auswahlliste.TypeKeys "-"
+ next j
+ end if
+
+ Wait 500
+ 'Select group given by the function
+ Auswahlliste.Select Group
+ ' Open group
+ Auswahlliste.TypeKeys "+"
+ Inhaltsansicht.Click
+ CountItemsInNavigatorGroup = Auswahlliste.GetItemCount - 1
+ Inhaltsansicht.Click
+
+end function
+
+'*******************************************************************
+
+function wCheckOutline(WhatToFind as string) as boolean
+ '/// This function checks the Outline in level 1 test.
+ '/// Purpose is to have a little tolerance, because when resolution changes, the
+ '/// line breaks are different
+ wCheckOutline = False
+ Kontext "DocumentImpressOutlineView"
+ DocumentImpressOutlineView.TypeKeys "<Home><Down>" ,1
+ DocumentImpressOutlineView.TypeKeys "<Home><Shift End>"
+ EditCopy
+ if GetClipboardText <> WhatToFind then
+ DocumentImpressOutlineView.TypeKeys "<Home><Up>" ,2
+ DocumentImpressOutlineView.TypeKeys "<Home><Shift End>"
+ EditCopy
+ if GetClipboardText = WhatToFind then
+ wCheckOutline = True
+ end if
+ else
+ wCheckOutline = True
+ end if
+end function
+
+'*******************************************************************
+
+function wSetZoom ( )
+ '/// This function sets the zoom size to 100% in a text document
+
+ ViewZoom
+ Kontext "Massstab"
+ Vergroesserung100.Check
+ Massstab.OK
+ Sleep 1
+
+
+end function
+
+'*******************************************************************
+
+function wGetSpellcheckDocumentName(xCategory as integer) as string
+ Dim sTemp as string, sReturn as string
+ '/// This function is to return the document to load in spellcheck test
+ select case xCategory
+ case 1:
+ select case iSprache
+ case 81, 82, 86, 88
+ sReturn = "None"
+ case 1
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_01.odt")
+ case 3
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_03.odt")
+ case 7
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_07.odt")
+ case else
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\spellcheck\st1_2_" & iSprache & ".odt")
+ end select
+
+ case 2:
+ select case iSprache
+ case 81, 82, 86, 88
+ sReturn = "None"
+ case 1
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\001.odt")
+ case 3
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\003.odt")
+ case 7
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\007.odt")
+ case else
+ sTemp = Convertpath(gTesttoolpath + "writer\optional\input\linguistik\0" & iSprache & ".odt")
+ end select
+ end select
+
+ if sReturn <> "None" then
+ if hFileExists(sTemp) then
+ sReturn = sTemp
+ else
+ sReturn = "Empty"
+ end if
+ end if
+
+ wGetSpellcheckDocumentName = sReturn
+
+end function
+
+'*******************************************************************
+
+sub wToolsSpellcheckCheckWriter
+ '/// This function opens the spellcheck-dialog in all applications
+ Select Case Ucase(gApplication)
+ Case "WRITER" : ToolsSpellcheckWriter
+ Case "MASTERDOCUMENT" : ToolsSpellcheckWriter
+ Case "HTML" : ToolsSpellcheckWriter
+ case "DRAW" : ToolsSpellcheck
+ case "IMPRESS" : ToolsSpellcheck
+ end select
+end sub
+
+'*******************************************************************
+
+sub wEnableAutoSpellcheck(sEnable as boolean)
+ '/// This function checks option 'AutoCheck' in Options
+ '/// requires a bool to indicate state
+ '/// from 680m61 on it is checked by default
+ ExtrasOptionen
+ Kontext "ExtrasOptionenDLG"
+ Call hToolsOptions("LanguageSettings","WritingAids")
+ Optionen.Select 1
+ Select Case sEnable
+ Case true
+ Optionen.Check
+ Case false
+ Optionen.UnCheck
+ end select
+ Kontext "ExtrasOptionenDLG"
+ ExtrasOptionenDLG.Ok
+
+end sub
+
+'*******************************************************************
+
+sub wEnableHyphenation(sEnable as boolean)
+ '/// This function enables/disables hyphenation
+ '/// through Format / Paragraph / Textflow
+ Call hNewDocument
+ FormatParagraph
+ Kontext
+ Active.SetPage TabTextfluss
+ kontext "TabTextfluss"
+ Select Case sEnable
+ case true
+ Automatisch.Check
+ case false
+ Automatisch.UnCheck
+ end select
+ TabTextfluss.OK
+ Call hCloseDocument
+
+end sub
diff --git a/testautomation/writer/tools/includes/w_tool5.inc b/testautomation/writer/tools/includes/w_tool5.inc
new file mode 100644
index 000000000000..383aefb2cdf5
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool5.inc
@@ -0,0 +1,235 @@
+'encoding UTF-8 Do not remove or change this line!
+'*******************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Description of file
+'*
+'\******************************************************************************
+
+function hLevelContent () as String
+ ' presupposition: just stay in line with the to check content
+ ' easy to enhance; on demand you can add text to the paragraph and only have to chage this function
+ ' input : -
+ ' output: paragraph content
+ dim sTemp as string
+ wTypeKeys "<end><shift home>" 'select line
+ editcopy
+ sTemp = GetClipboardText()
+ 'i don't need the first '-', so i start searching at 2. char
+ hLevelContent = Right(sTemp, Len(sTemp)-InStr(2,sTemp,"-")
+end function
+
+'------------------------------------------------------------------------------
+
+function hLevelChange(aL() as integer,i as integer,x as integer ,y as integer, sublevel as boolean ) as boolean
+ ' ALSO boolean, if it schould be checked, if it got changed! else don't adjust array!!!
+ ' input: level Nr., how many levels +/-
+ ' return: false, if wrong paragraph
+
+ dim itemp as integer
+ dim xtemp as integer
+ dim ytemp as integer
+ dim stemp as integer
+ dim j as integer
+
+ if (hLevelOk (i)) then
+ if (aL (i,1) + x) > 0 then ' CHG <-> level 'stufen'
+ ' has to work for +/- x
+ xTemp = aL (i,1)
+ aL (i,1) = aL (i,1) + x
+ if (sublevel) then
+ iTemp = i+1
+ do while (aL (iTemp,1) > xTemp)
+ aL (iTemp,1) = aL (iTemp,1) + x
+ iTemp=iTemp + 1
+ loop
+ end if
+ else
+ 'warnlog "This makes no sense; you trie to 'move to the left'; it doesn't go further! Entry: "+i
+ end if
+ iTemp = 1
+ do while (i <> aL(itemp,2))
+ inc iTemp
+ loop
+ printlog "CHG: found i="+i+" at: "+iTemp
+
+ ' move entry without sublevels
+ if (y < -1) OR (y > 1) then warnlog "y ! aus (-1,1) is not implemented :-( yet !"
+ if (y > 0) then
+ xtemp = aL( itemp+y ,1)
+ aL( itemp+y ,1) = aL( itemp ,1)
+ aL( itemp ,1) = xtemp
+ xtemp = aL( itemp+y ,2)
+ aL( itemp+y ,2) = aL( itemp ,2)
+ aL( itemp ,2) = xtemp
+ if (sublevel) then ' with sublevel
+ yTemp = aL( iTemp+y ,1) ' save hor <-> level in yTemp
+ sTemp = 2
+ do while (aL (iTemp ,1) > yTemp)
+ xtemp = aL( itemp+sTemp ,1)
+ aL( itemp+sTemp ,1) = aL( itemp ,1)
+ aL( itemp ,1) = xtemp
+ xtemp = aL( itemp+sTemp ,2)
+ aL( itemp+sTemp ,2) = aL( itemp ,2)
+ aL( itemp ,2) = xtemp
+ inc sTemp
+ loop
+ end if
+ else
+ if (y < 0) then
+ for j=-1 to y
+ xtemp = aL( itemp+j ,1) ' hori <-> level copy
+ aL( itemp+j ,1) = aL( itemp+j+1 ,1)
+ aL( itemp+j+1 ,1) = xtemp ' ^
+ xtemp = aL( itemp+j ,2) ' vert | level copy
+ aL( itemp+j ,2) = aL( itemp+j+1 ,2) ' v
+ aL( itemp+j+1 ,2) = xtemp
+ next j
+ if (sublevel) then ' with sublevel
+ yTemp = aL( iTemp+y ,1) ' save hor <-> level in yTemp
+ iTemp = itemp+1
+ do while (aL (iTemp,1) > yTemp)
+ xtemp = aL( itemp+y ,1)
+ aL( itemp+y ,1) = aL( itemp+y+1 ,1)
+ aL( itemp+y+1 ,1) = xtemp
+ xtemp = aL( itemp+y ,2)
+ aL( itemp+y ,2) = aL( itemp+y+1 ,2)
+ aL( itemp+y+1 ,2) = xtemp
+ iTemp=iTemp + 1
+ loop
+ end if
+ else ' 0
+ end if
+ end if
+ end if
+end function
+
+'------------------------------------------------------------------------------
+
+function hLevelPrint (aL()as integer) as boolean
+ dim sTemp as string
+ dim iTemp as integer
+ dim i,j as integer
+ ' how big is this array??!!! pd: it has to be in aL(0,0)
+ printlog "---------------------------------------------------------------------"
+ for i=1 to aL(0,0)
+ sTemp = ""
+ for j=1 to aL(i,1)
+ sTemp = sTemp + "..."
+ next j
+ printlog sTemp + i + " "+aL(i,2)+ " +1: "+aL(i,1)
+ next i
+ printlog "---------------------------------------------------------------------"
+end function
+
+'------------------------------------------------------------------------------
+
+function hIsNumberingBullets () as Boolean
+ '/// am i in a NumberingBullets area ?? ///'
+ '/// Output: True / False (as Boolean) ///'
+ dim NOerror as Boolean
+
+ hIsNumberingBullets = false
+ NOerror = false
+
+ sleep (1)
+ try
+ FormatNumberingBullets
+ NOerror = true
+ catch
+ Warnlog "w_tool5.inc::hIsNumberingBullets::Slot not available"
+ NOerror = false
+ endcatch
+
+ if NOerror then
+ Kontext
+ Active.SetPage TabBullet
+ Kontext "TabBullet"
+ sleep (1)
+ if (remove.isEnabled) then
+ hIsNumberingBullets = true
+ else
+ hIsNumberingBullets = false
+ end if
+ TabBullet.cancel
+ end if
+ sleep (1)
+end function
+
+'------------------------------------------------------------------------------
+
+sub hFormatParagraphNumbering (sStyle as string,bRestart as integer,sStartW as string)
+
+ FormatParagraph
+ Kontext
+ Active.SetPage TabNumerierungAbsatz
+ Kontext "TabNumerierungAbsatz"
+
+ try
+ if (sStyle <> "") then
+ Vorlage.Select sStyle
+ else
+ Vorlage.Select 2
+ end if
+ if (bRestart <> -1) then
+ select case bRestart
+ case 0: NumerierungNeuBeginnen.UnCheck
+ case 1: NumerierungNeuBeginnen.Check
+ case 2: NumerierungNeuBeginnen.TriState
+ end select
+ end if
+ if (sStartW <> -1) then
+ select case sStartW
+ case 0: NumerierungBeginnenBei.UnCheck
+ case 1: NumerierungBeginnenBei.Check
+ end select
+ end if
+ catch
+ Warnlog "Not possible; wrong style=none??"
+ endcatch
+
+ TabNumerierungAbsatz.OK
+
+end sub
+
+'------------------------------------------------------------------------------
+
+function hFindInDocument (sTempSearch as string) as boolean
+ dim sTemp as string
+
+ hFindInDocument = FALSE
+ Call hFindeImDokument (sTempSearch, 1)
+ EditCopy
+ sTemp = right (GetClipboardText(), len(sTempSearch))
+ if (sTemp <> sTempSearch) then
+ Warnlog "Found: '" & sTemp & "' and not: " & sTempSearch
+ hFindInDocument = FALSE
+ else
+ hFindInDocument = TRUE
+ end if
+end function
diff --git a/testautomation/writer/tools/includes/w_tool6.inc b/testautomation/writer/tools/includes/w_tool6.inc
new file mode 100644
index 000000000000..caba673ae6be
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool6.inc
@@ -0,0 +1,769 @@
+'encoding UTF-8 Do not remove or change this line!
+'*******************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Tools for writer tests.
+'*
+'\******************************************************************************
+
+sub wOfficeRestart
+
+ hFileCloseAll()
+ ' Close the backing windows
+ FileExit "SynchronMode", TRUE
+
+ Call hStartTheOffice
+end sub
+
+'--------------------------------------------------------------
+' end of temporaly functions
+'--------------------------------------------------------------
+
+function LiberalMeasurement ( sShould$, sActual$) as Boolean
+ '/// Input : (1. Should, 2. Actual) as Number with or without MeasurementUnit 'NumericField' as String ///'
+ '///+ if input has no MeasurementUnit i take it as 'cm' (was the default in old tests) ///'
+ '///+ Output: Boolean are they likely the same?
+ '/// NEEDED: mathematical proofment of iTolerance, by now just some guesses :-| ///'
+ '/// reason for this function:///'
+ '///+ because SO counts internaly in 'twip┤s' 'twentieth of a point' there are some rounding errors ///'
+ '///+ there are also some rounding errors because of the internal representatio of floating point numbers in computers ///'
+ '///+ now lets try to get rid of them and have a nicer output in tests... ///'
+ dim iTolerance as Double
+
+ LiberalMeasurement = False ' worst case
+
+ if (sShould$ = sActual$) then
+ LiberalMeasurement = True
+ else
+ ' check if measunit is the same !!
+ if (GetMeasUnit(sShould$) <> GetMeasUnit(sActual$) ) then
+ warnlog "in function LiberalMeasurement the measUnit is different, compare not possible yet :-("
+ else
+ ' set factor for liberality ;-)
+ iTolerance = 0.04
+ if ( (StrToDouble(sShould$) + iTolerance) >= StrToDouble(sActual$) ) AND ((StrToDouble ( sShould$ ) - iTolerance) <= StrToDouble ( sActual$ )) then
+ LiberalMeasurement = True
+ else
+ LiberalMeasurement = False
+ end if
+ end if
+ end if
+end function
+
+'--------------------------------------------------------------
+
+function GetMeasUnit ( sWert$ ) as String
+ '/// Input : Number with or without MeasurementUnit 'NumericField' as String ///'
+ '///+ Output: Initials of MeasurementUnit as String or "" when only a number ///'
+
+ '/// first lets check, if there is a number -> no unit there ///
+ if isNumeric (right (sWert$, 1)) then
+ GetMeasUnit = ""
+ else
+ '/// the only single character is '"' all others are two chars ///
+ if ( StrComp (right (sWert$, 1), chr$(34) ) = 0 ) then
+ GetMeasUnit = right (sWert$, 1)
+ else
+ GetMeasUnit = right (sWert$, 2)
+ end if
+ end if
+end function
+
+'--------------------------------------------------------------
+
+function StrToDouble ( sWert$ ) as Double
+ Dim sDummy$, test
+ 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
+ ' there was a problem, if there is NO meas.unit!!!
+ if Len(sWert$) > Len(mUnit) then
+ test = Left$(sWert$, (len(sWert$) - Len(mUnit)))
+ StrToDouble = cDbl(rtrim(test))
+ exit function
+ if (isNumeric (sWert$) = FALSE) then
+ if ( StrComp (right (sWert$, 1), chr$(34) ) = 0 ) then
+ sDummy$ = Left$ ( sWert$, Len(sWert$)-1 )
+ else
+ sDummy$ = Left$ ( sWert$, Len(sWert$)-2 )
+ 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
+ endcatch
+ n = (len (sDummy$)-i)
+ b = val (right$ (sDummy$, n) )
+ c = b * 10 ^ -n
+ StrToDouble = a + c
+ else
+ StrToDouble = 0
+ end if
+end function
+
+'--------------------------------------------------------------
+
+function wKillUpcomingActives(optional sDocument as string)
+ ' primary used in import/export tests
+ '/// to get any aktive killed & print the content of the aktive ///'
+ ' to catch errors during loading document
+ Kontext "Active"
+ if Active.Exists then
+ if Strcomp(Left(Active.GetText,42),"Saving in external formats may have caused") = 0 then
+ printlog "info loss, messg!! OK??"
+ end if
+ try
+ Active.Yes
+ catch
+ printLog Active.GetText
+ endcatch
+ sleep(2)
+ Kontext "Active"
+ if Active.Exists then
+ if IsMissing(sDocument) then
+ Warnlog "(1/2): " + Active.GetText ' Changed from Warn to print.
+ else
+ Select case sDocument
+ Case "sw31.sdw", "sw31.vor"
+ warnlog "Saving sdw-file as sxw fails"
+ Case else
+ Warnlog Active.Gettext
+ end select
+ end if
+ try
+ Active.Ok ' Read Error
+ catch
+ Active.No ' Style is different ...
+ endcatch
+ end if
+ end if
+ ' catching style after read error :-)
+ sleep(2)
+ Kontext "Active"
+ if Active.Exists then
+ WarnLog "(2/2): "+Active.GetText
+ try
+ Active.No ' Style is different ...
+ catch
+ Active.Ok ' maybe...
+ endcatch
+ end if
+end function
+
+'--------------------------------------------------------------
+
+function wGetCharacterFont as String
+ Dim wasAsianLan as boolean
+ '/// Input : nothing ///'
+ '///+ Output: Fontname at cursor position as String ///'
+ FormatCharacter
+ Kontext
+ sleep (1)
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ sleep (1)
+ try
+ if gAsianSup = True then
+ wGetCharacterFont = FontWest.GetSelText
+ else
+ wGetCharacterFont = Font.GetSelText
+ end if
+ TabFont.Cancel
+ sleep (1)
+ catch
+ TabFont.Cancel
+ wasAsianLan = ActiveDeactivateAsianSupport (True)
+ FormatCharacter
+ Kontext
+ sleep (1)
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ sleep (1)
+ wGetCharacterFont = FontWest.GetSelText
+ TabFont.Cancel
+ sleep (1)
+ wasAsianLan = ActiveDeactivateAsianSupport (True)
+ endcatch
+end function
+
+'--------------------------------------------------------------
+
+function wGetCharacterFontSize as String
+ Dim wasAsianLan as boolean
+ '/// Input : nothing ///'
+ '///+ Output: FontSize at cursor position as String ///'
+ FormatCharacter
+ Kontext
+ sleep (1)
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ sleep (1)
+ try
+ if gAsianSup = True then
+ wGetCharacterFontSize = SizeWest.GetSelText
+ else
+ wGetCharacterFontSize = Size.GetSelText
+ end if
+ TabFont.Cancel
+ sleep (1)
+ catch
+ TabFont.Cancel
+ wasAsianLan = ActiveDeactivateAsianSupport (True)
+ FormatCharacter
+ Kontext
+ sleep (1)
+ Active.SetPage TabFont
+ Kontext "TabFont"
+ sleep (1)
+ wGetCharacterFontSize = SizeWest.GetSelText
+ TabFont.Cancel
+ sleep (1)
+ wasAsianLan = ActiveDeactivateAsianSupport (True)
+ endcatch
+end function
+
+'--------------------------------------------------------------
+
+function ZeilenHoeheHolen as Double
+ '/// input: nothing///'
+ '///+ output: FormatRowHeight as double///'
+ Dim zWert as Double : Dim Ausgabe$
+ FormatRowHeight
+ Wait 100
+ Kontext "ZellenHoehe"
+ Ausgabe$ = Hoehe.GetText
+ zWert = ZahlAusSpinnfield ( Ausgabe$ )
+ if zWert = 0.01 then
+ ZeilenHoeheHolen = 0.00
+ else
+ ZeilenHoeheHolen = zWert
+ end if
+ ZellenHoehe.OK
+end function
+
+'--------------------------------------------------------------
+
+sub ZeilenHoeheTesten ( Wert as Double )
+ '/// input: FormatRowHeight as double///'
+ '///+ output: warnlog, if not eaqual ///'
+ '/// LiberalMeasurement enabled///'
+ Dim zWert as Double
+ FormatRowHeight
+ Kontext "ZellenHoehe"
+ zWert = ZahlAusSpinnfield ( Hoehe.GetText )
+ if (LiberalMeasurement (Wert, zWert) <> TRUE) then QAErrorlog "#i94556# - Die Zeilenhöhe ist nicht "+ Wert + " sondern "+ zWert + "."
+ ZellenHoehe.OK
+end sub
+
+'--------------------------------------------------------------
+
+function SpaltenBreiteHolen as Double
+ FormatColumnWidthWriter
+ Kontext "SpaltenBreite"
+ SpaltenBreiteHolen = ZahlAusSpinnfield (Breite.GetText )
+ SpaltenBreite.OK
+end function
+
+'--------------------------------------------------------------
+
+sub SpaltenBreiteTesten ( Wert as Double )
+ Dim zWert as Double
+ FormatColumnWidthWriter
+ Kontext "SpaltenBreite"
+ zWert = ZahlAusSpinnfield ( Breite.GetText )
+ if Not Wert = zWert then
+ Warnlog "Die Spaltenbreite ist nicht "+ Wert +" sondern "+ zWert
+ end if
+ SpaltenBreite.OK
+end sub
+
+'--------------------------------------------------------------
+
+sub SeitenAbstaendeHolen ( ZweiWerte() as Double )
+ FormatTable
+ Kontext
+ Active.SetPage TabTabelle
+ Kontext "TabTabelle"
+ ZweiWerte(1) = ZahlAusSpinnfield ( NachLinks.GetText )
+ ZweiWerte(2) = ZahlAusSpinnfield ( NachRechts.GetText )
+ TabTabelle.Cancel
+end sub
+
+'--------------------------------------------------------------
+
+sub SeitenAbstaendeTesten ( WertLi as Double, WertRe as Double )
+ '/// liberalMeasurement implemented ///'
+ Dim zWert1 as Double : Dim zWert2 as Double
+ FormatTable
+ Kontext
+ Active.SetPage TabTabelle
+ Kontext "TabTabelle"
+ zWert1 = ZahlAusSpinnfield ( NachLinks.GetText )
+ zWert2 = ZahlAusSpinnfield ( NachRechts.GetText )
+
+ if (LiberalMeasurement (zWert1, WertLi) <> TRUE) then Warnlog "Left distance not " + WertLi + " but " + zWert1
+ if (LiberalMeasurement (zWert2, WertRe) <> TRUE) then Warnlog "Right distance not " + WertRe + " but " + zWert2
+ wait 300
+ TabTabelle.Cancel
+end sub
+
+'--------------------------------------------------------------
+
+function ZahlAusSpinnfield ( sWert$ ) as Double
+ ZahlAusSpinnfield = StrToDouble ( sWert$)
+ printlog ZahlAusSpinnfield
+end function
+
+'--------------------------------------------------------------
+
+sub ZeilenTesten ( Anzahl% )
+ dim temp(10) as string
+ Dim i as Integer
+ Dim Dummy as Integer
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<Up>", 5 ' Move out of table ????!!!!
+ for i=2 to Anzahl% +4 ' might work, but if there are some more tables, it doesn't!!
+ try
+ Call wTypeKeys "<Down>"
+ FormatRowHeight 'This is OK; but different evaluation is necessary
+ Kontext "ZellenHoehe"
+ ZellenHoehe.Cancel
+ dummy = i
+ catch
+ i = Anzahl% +20
+ endcatch
+ next i
+ if dummy <> Anzahl% then Warnlog "Die Tabelle hat wohl mehr Zeilen als erwartet: soll => "+ Anzahl% +" sind "+ dummy
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<Up><Left>", 10
+end sub
+
+'--------------------------------------------------------------
+
+sub SpaltenTesten ( Anzahl% )
+ FormatColumnWidthWriter
+ Kontext "SpaltenBreite"
+ Spalte.More Anzahl%
+ if Anzahl% <> Spalte.GetText then Warnlog "Table has mohl column then expected: should => "+ Anzahl% +" is "+ Spalte.GetText
+ SpaltenBreite.Cancel
+end sub
+
+'--------------------------------------------------------------
+
+sub TBOhTabelleEinfuegen (optional tName as string, optional tHeader as boolean, optional tRepeat as boolean, optional tSeperate as boolean, optional tBorder as boolean, optional tWidth as string, optional tHeight as string )
+ '/// TBOhTabelleEinfuegen ("Garfield",0,1,0,1,"10",tHeight:="7") ///'
+ ' maybe TODO: return of an array, that tells you the state of an existing / name table/ cause, you create a table in a tabl÷e :-)
+ ' try with switching tabpage
+ InsertTableWriter
+ Sleep 2
+ Kontext "TabelleEinfuegenWriter"
+ wait 500
+
+ ' Default had been changed. Not to rewrite the whole test I decided to changed the row-number
+ Spalten.Settext "5"
+ wait 500
+
+ if (IsMissing (tName) <> True) then TabellenName.SetText tName
+ if (IsMissing (tHeader) <> True) then
+ if tHeader then
+ Ueberschrift.Check
+ if (IsMissing (tRepeat) <> True) then if tRepeat then UeberschriftWiederholen.Check else UeberschriftWiederholen.UnCheck
+ else
+ Ueberschrift.UnCheck
+ end if
+ end if
+
+ if IsMissing (tSeperate) <> True then
+ if tSeperate then
+ TabelleNichtTrennen.Check
+ else
+ TabelleNichtTrennen.UnCheck
+ end if
+ end if
+
+ if IsMissing(tBorder) <> True then
+ if tBorder then
+ Umrandung.check
+ else
+ Umrandung.check
+ end if
+ end if
+
+ if IsMissing(tWidth) <> True then
+ Spalten.SetText tWidth
+ else
+ Spalten.Settext "5"
+ end if
+ if IsMissing(tHeight) <> True then Zeilen.SetText tHeight
+
+ TabelleEinfuegenWriter.OK
+ Sleep 1
+
+ Kontext "TableObjectbar"
+ Sleep 1
+ if TableObjectbar.NotExists then
+ Kontext "TextObjectbar"
+ TextObjectbar.SetNextToolBox
+ end if
+
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+
+ end select
+ Sleep 1
+end sub
+
+'--------------------------------------------------------------
+
+function hGetTableName () as string
+ hGetTableName = "" ' Worst Case
+ TableTableProperties ' get into existing table
+ Sleep (1)
+ try
+ Kontext
+ Active.SetPage TabTabelle
+ Sleep (1)
+ Kontext "TabTabelle"
+ Sleep (1)
+ hGetTableName = TabellenName.GetText
+ TabTabelle.Cancel
+ catch
+ Kontext "TabelleEinfuegenWriter"
+ if TabelleEinfuegenWriter.Exists then
+ hGetTableName = TabellenName.Gettext
+ TabelleEinfuegenWriter.Ok
+ else
+ hGetTableName = ""
+ end if
+ endcatch
+ Sleep (1)
+end function
+
+'--------------------------------------------------------------
+
+function dec(Ref as integer)
+ ' ----------------------------------------
+ ' to give this func a var as ref: call without ANNY brackets => 'dec Variable'
+ ' opposite of this to call it via value ! WE DON'T WANT THIS !
+ ' (would be 'dec (Variable)' or in declaration 'function dec (ByVal x)')
+ Ref = Ref - 1
+end function
+
+'--------------------------------------------------------------
+
+function inc(Ref as integer)
+ 'printlog "inc:"+ref
+ Ref = Ref + 1
+end function
+
+'--------------------------------------------------------------
+
+function hGetColumn() as integer
+ try
+ FormatColumnWidthWriter
+ catch
+ printlog "func1.inc->hGetColumn asks for table."
+ hTypeKeys "<left>"
+ try
+ FormatColumnWidthWriter
+ catch
+ print "giving up to find a table: func1 hgetcolumn 2"
+ endcatch
+ endcatch
+ Kontext "SpaltenBreite"
+ if SpaltenBreite.exists then
+ hGetColumn = Spalte.GetText
+ SpaltenBreite.Cancel
+ else
+ hGetColumn = 0
+ end if
+end function
+
+'--------------------------------------------------------------
+
+function hNavigatorOpenWindows() as Integer
+ hNavigatorOpenWindows = 0
+
+ goto ENDE
+ '/// Input: (); Output: 0: for the usual started SO first window / +1 for each other open Window ///'
+ '///+ -2 if no window is open :-) (i think then there is another problem ...)///'
+ '///+ this fuunction depends on navigator-fuunction: ///'
+ '///+ NO nav avail in: Formular; NOT CATCHED UPTONOW ///'
+ '///+ count classes - only windows in this class are visible in their nav ///'
+ '///+ Spreadsheet ///'
+ '///+ Presentation, Drawing///'
+ '///+ Text Doc, HTML Doc, Labels, Business cards, AND ///'
+ '///+ !Master Doc! in his nav are no windows countable!; NOT CATCHED UPTONOW ///'
+
+ '/// usually it counts 2 windows; 1. the window, that results in starting office ///'
+ '///+ 2. The entry 'Active Window', is always there (entries in navigator changes automatical ///'
+ '///+ to the visible window -> 2 this is the minima! ///'
+ '///+ so i give back a count of x-2 everything below 0 is an error !///'
+
+ dim j as integer, WelcherEintrag as integer
+ ' Navigator zur├�?cksetzen
+ Kontext "NavigatorWriter"
+ if NavigatorWriter.NotExists then ViewNavigator
+ sleep (1)
+ Kontext
+ do while (Active.Exists)
+ printlog Active.GetText
+ try
+ active.yes ' ....
+ catch
+ active.ok ' ...new since 638a5 7001 :-(
+ endcatch
+ Kontext
+ loop
+ Kontext "NavigatorWriter"
+ sleep (3)
+ hNavigatorOpenWindows = DokumentListe.GetItemCount - 2 ' couldn' see dokumentliste :-( reason:: active that prevents it :-(
+ sleep (3)
+ ' printlog " hnow: "+DokumentListe.GetItemCount +" "+DokumentListe.GetSelText
+ if (DokumentListe.GetItemCount = 0) then print "waassss o ??!!?!??!?!"
+ ' close Navigator
+ ViewNavigator
+ Kontext "DocumentWriter"
+ ENDE:
+end function
+
+'--------------------------------------------------------------
+
+function hIsNamedDocLoaded (ShouldFile as String) as Boolean
+ '/// Input: name of loaded file; Output: True/False///'
+ '///+ Several checks may be combined: ///'
+ '///+ disabled: Plan A: requires clippboard: check, if not untitled 1 window... ///'
+ '///+ Plan B: SaveAs Dialog ///'
+ '///+ not used now: Plan C: check if hNavigatorOpenWindows() > 0 ///'
+
+ '///' Plan A :-( ///
+ ''///+ to be able to check, that document was loaded, print something before opening new doc ///'
+ ''///+ during test, check if it is readable ... ///'
+ ' Kontext "DocumentWriter"
+ ' DocumentWriter.TypeKeys "<Mod1 home>"
+ ' DocumentWriter.TypeKeys "TBOlastWindow"
+ ' DocumentWriter.TypeKeys "<Return>"
+
+ ' Kontext "DocumentWriter"
+ ' DocumentWriter.TypeKeys "<Mod1 Home>"
+ ' DocumentWriter.TypeKeys "<Shift End>"
+ ' EditCopy
+ ' DocumentWriter.TypeKeys "<Home>"
+ ' if GetClipboardText <> "TBOlastWindow" Then ///'
+
+ '/// ' Plan B :-) ///
+ '///+' if a doc got loaded, the filename in a 'SaveAs' Dlg is different from "" ///
+ '///+' usually the file name of the loaded document with an changed extension chosen from SO ///
+
+ hIsNamedDocLoaded = False ' Let's start WorstCase :-(
+ FileSaveAs ' (Plan B)
+ Kontext "SpeichernDlg"
+ If DateiOhneExt(DateiExtract(Dateiname.GetSelText)) = DateiOhneExt(DateiExtract(ShouldFile)) Then
+ hIsNamedDocLoaded = True
+ ' Printlog "Filename: " + Dateiname.GetSelText+"; "+ShouldFile
+ ' Printlog "--------------------------------------------------Loaded as: " + Dateityp.GetSelText
+ Else
+ 'exception! for templates
+ if lcase(right(ShouldFile,3)) = "vor" or lcase(right(ShouldFile,3)) = "dot" then hIsNamedDocLoaded = True
+ End If
+ SpeichernDlg.Cancel
+
+ '/ remove text of last window test text ///'
+ ' Kontext "DocumentWriter"
+ ' DocumentWriter.TypeKeys "<Mod1 home>"
+ ' DocumentWriter.TypeKeys "TBOlastWindow"
+ ' DocumentWriter.TypeKeys "<delete>"
+end function
+
+'--------------------------------------------------------------
+
+sub hSetSpellHypLanguage
+ dim sTrieit
+ if bAsianLan then
+ Printlog " to get it to work, ihave to change the default languge in the options! FOR CURRENT DOCUMENT ONLY!!!!!"
+ ToolsOptions
+ Call hToolsOptions ("LANGUAGESETTINGS","LANGUAGES")
+ AktuellesDokument.Check
+ if glLocale (4) = "" then
+ warnlog "choose a spellbokk from the list below and insert it into the file <\testtool\input\impress\locale_1.txt> on position (4) (only enabled for asiann languages!) - '"+glLocale(4)+"'"
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
+ sTrieit = hFindSpellHypLanguage
+ ToolsOptions
+ Call hToolsOptions ("LANGUAGESETTINGS","LANGUAGES")
+ AktuellesDokument.Check
+ if sTrieit <> "" then
+ Westlich.Select sTrieit
+ else
+ warnlog "SOrry no spellbook found :-("
+ end if
+ else
+ Westlich.Select glLocale (4)
+ end if
+ printlog "selected: "+Westlich.GetSelText
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ end if
+end sub
+
+'--------------------------------------------------------------
+
+sub hFindSpellHypLanguage as string
+ dim iListLength as integer
+ dim i as integer
+
+ if bAsianLan then
+ ToolsOptions ' take length of list
+ Call hToolsOptions ("LANGUAGESETTINGS","WRITINGAIDS")
+ SprachmoduleBearbeiten.click
+ Kontext "ModuleBearbeiten"
+ for i = 1 to Sprache.GetItemCount
+ Sprache.Select i
+ sleep 1
+ Printlog " "+i+": '"+Sprache.GetSelText +"'"
+ if i = 1 then hFindSpellHypLanguage = Sprache.GetSelText
+ next i
+ ModuleBearbeiten.Close
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ sleep 1
+ end if
+end sub
+
+'--------------------------------------------------------------
+
+function wCheckRowHeight ( ShouldValue as string ) as boolean
+ FormatRowHeight
+ Kontext "ZellenHoehe"
+ if Hoehe.Gettext <> ShouldValue then
+ Warnlog "Height is not " + ShouldValue + " but " + Hoehe.Gettext
+ wCheckRowHeight = False
+ else
+ wCheckRowHeight = True
+ end if
+ ZellenHoehe.Cancel
+end function
+
+'--------------------------------------------------------------
+
+sub wSearchWriteableArea ()
+ Dim PageDownNow as boolean, NowWriteable as boolean
+ Dim i as integer
+ ' This sup has not been properly worked
+ ' Looks complicated but isn't
+ ' Searches for messagebox, if found makes a PageDown in document 5 times
+ ' if writeable then, the moves curors up 1000 times. Hope it helps
+ ' Document is completely writeprotected the sup would loop endless
+ NowWriteable = False
+ PageDownNow = True
+ Do until NowWriteable = True
+ Call wTypeKeys " "
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Ok
+ if PageDownNow = True then
+ for i = 1 to 10
+ Call wTypeKeys "<Down>", 5
+ Call wTypeKeys " "
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Ok
+ end if
+ else
+ NowWriteable = True
+ i = 11
+ end if
+ next i
+ else
+ for i = 1 to 1000
+ Call wTypeKeys "<Up>", 1
+ Call wTypeKeys " "
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Ok
+ end if
+ else
+ NowWriteable = True
+ i = 1002
+ end if
+ next i
+ end if
+ else
+ NowWriteable = True
+ Exit Do
+ end if
+ else
+ NowWriteable = True
+ Exit Do
+ end if
+ Loop
+end sub
+
+'---------------------------------------------------
+
+function fInsertFrame (x1 as Integer , y1 as Integer , x2 as Integer , y2 as Integer)
+ 'This function will insert a frame with the coordinate
+
+ Call wDocSetContext
+
+ Call hToolbarSelect("INSERT", true )
+ Sleep 1
+ Kontext "Insertbar"
+ Rahmen.Click
+ Sleep 1
+
+ Call gMouseDown ( x1,y1 )
+ Call gMouseMove ( x1,y1,x2,y2 )
+ Call gMouseUp( x2,y2 )
+ wait 500
+
+end function
diff --git a/testautomation/writer/tools/includes/w_tool7.inc b/testautomation/writer/tools/includes/w_tool7.inc
new file mode 100644
index 000000000000..3823efc65586
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tool7.inc
@@ -0,0 +1,460 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Functions mostly used for fields
+'*
+'*******************************************************************
+'*
+' #0 fSetLocale
+' #0 fSetWestern
+' #0 fSetAsian
+' #0 fGetType
+' #0 fGetFieldContent
+' #0 fGetDate
+' #0 fGetDate1
+'*
+'\***********************************************************************
+
+function fSetLocale(sLocaleSetting as String) as String
+
+ 'This function is set Locale in Tools/Options/Language Settings / Languages
+ ToolsOptions
+ Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
+ fSetLocale = Gebietsschema.GetSelText
+ Gebietsschema.Select sLocaleSetting
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+end function
+
+'----------------------------------------------------
+
+function fSetWestern(sWestern as String) as String
+
+ 'This function is set western language in Tools/Options/Language Settings / Languages
+ ToolsOptions
+ Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
+ fSetWestern = Westlich.GetSelText
+ if sWestern = "Null" then
+ Westlich.Select 1
+ goto GoON
+ end if
+ Westlich.Select sWestern
+ GoON:
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+end function
+
+'----------------------------------------------------
+
+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
+ if Asiatisch.IsEnabled then Asiatisch.Select 1
+ else
+ if Asiatisch.IsEnabled then Asiatisch.Select sAsian
+ end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+end function
+
+'----------------------------------------------------
+
+function fGetType(sType as String) as String
+
+ 'This function will RETURN TYPE
+ select case sType
+ case "Author"
+ select case iSprache
+ case 1: fGetType = "Author"
+ case 7: fGetType = "Автор"
+ case 31: fGetType = "Gebruiker"
+ case 33: fGetType = "Utilisateur"
+ case 34: fGetType = "Autor"
+ case 36: fGetType = "Szerzó"
+ case 39: fGetType = "Autore"
+ case 46: fGetType = "Användare"
+ case 49: fGetType = "Benutzer"
+ case 55: fGetType = "Autor"
+ case 81: fGetType = "ユーザー"
+ case 82: fGetType = "작성�?"
+ case 86: fGetType = "使用者"
+ case 88: fGetType = "使用者"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Chapter"
+ select case iSprache
+ case 1: fGetType = "Chapter"
+ case 7: fGetType = "Глава"
+ case 31: fGetType = "Hoofdstuk"
+ case 33: fGetType = "Chapitre"
+ case 34: fGetType = "Capítulo"
+ case 36: fGetType = "Fejezet"
+ case 39: fGetType = "Capitolo"
+ case 46: fGetType = "Kapitel"
+ case 49: fGetType = "Kapitel"
+ case 55: fGetType = "Capítulo"
+ case 81: fGetType = "章"
+ case 82: fGetType = "장"
+ case 86: fGetType = "章"
+ case 88: fGetType = "章"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Date"
+ select case iSprache
+ case 1: fGetType = "Date"
+ case 7: fGetTYpe = "Дата"
+ case 31: fGetType = "Datum"
+ case 33: fGetType = "Date"
+ case 34: fGetType = "Fecha"
+ case 36: fGetType = "Dátum"
+ case 39: fGetType = "Data"
+ case 46: fGetType = "Datum"
+ case 49: fGetType = "Datum"
+ case 55: fGetType = "Data"
+ case 81: fGetType = "日付"
+ case 82: fGetType = "날짜"
+ case 86: fGetType = "日期"
+ case 88: fGetType = "日期"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "File name"
+ select case iSprache
+ case 1: fGetType = "File name"
+ case 7: fGetType = "Имя файла"
+ case 31: fGetType = "Bestandsnaam"
+ case 33: fGetType = "Nom de fichier"
+ case 34: fGetType = "Nombre del archivo"
+ case 36: fGetType = "Fájlnév"
+ case 39: fGetType = "Nome file"
+ case 46: fGetType = "Filnamn"
+ case 49: fGetType = "Dateiname"
+ case 55: fGetType = "Nome do arquivo"
+ case 81: fGetType = "ファイル�??"
+ case 82: fGetType = "파�?� �?�름"
+ case 86: fGetType = "文件�??"
+ case 88: fGetType = "檔案�??"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Page"
+ select case iSprache
+ case 1: fGetType = "Page"
+ case 7: fGetType = "Страница"
+ case 31: fGetType = "Pagina"
+ case 33: fGetType = "Page"
+ case 34: fGetType = "Página"
+ case 36: fGetType = "Oldal"
+ case 39: fGetType = "Pagina"
+ case 46: fGetType = "Sida"
+ case 49: fGetType = "Seite"
+ case 55: fGetType = "Página"
+ case 81: fGetType = "ページ"
+ case 82: fGetType = "페�?�지"
+ case 86: fGetType = "页"
+ case 88: fGetType = "�?"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Sender"
+ select case iSprache
+ case 1: fGetType = "Sender"
+ case 7: fGetType = "Отправитель"
+ case 31: fGetType = "Afzender"
+ case 33: fGetType = "Expéditeur"
+ case 34: fGetType = "Remitente"
+ case 36: fGetType = "Feladó"
+ case 39: fGetType = "Mittente"
+ case 46: fGetType = "Avsändare"
+ case 49: fGetType = "Absender"
+ case 55: fGetType = "Remetente"
+ case 81: fGetType = "差出人"
+ case 82: fGetType = "보낸 사람"
+ case 86: fGetType = "�?�件人"
+ case 88: fGetType = "寄件者"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Statistics"
+ select case iSprache
+ case 1: fGetType = "Statistics"
+ case 7: fGetType = "Статистика"
+ case 31: fGetType = "Statistiek"
+ case 33: fGetType = "Statistiques"
+ case 34: fGetType = "Estadística"
+ case 36: fGetType = "Statisztika"
+ case 39: fGetType = "Statistiche"
+ case 46: fGetType = "Statistik"
+ case 49: fGetType = "Statistik"
+ case 55: fGetType = "Estatísticas"
+ case 81: fGetType = "統計"
+ case 82: fGetType = "통계"
+ case 86: fGetType = "统计"
+ case 88: fGetType = "統計"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Templates"
+ select case iSprache
+ case 1: fGetType = "Templates"
+ case 7: fGetType = "Шаблоны"
+ case 31: fGetType = "Sjablonen"
+ case 33: fGetType = "Modèle de document"
+ case 34: fGetType = "Plantillas"
+ case 36: fGetType = "Sablonok"
+ case 39: fGetType = "Modello"
+ case 46: fGetType = "Dokumentmall"
+ case 49: fGetType = "Dokumentvorlage"
+ case 55: fGetType = "Modelos"
+ case 81: fGetType = "ドキュメントテンプレート"
+ case 82: fGetType = "서�? 파�?�"
+ case 86: fGetType = "文档�?样"
+ case 88: fGetType = "文件樣�?"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case "Time"
+ select case iSprache
+ case 1: fGetType = "Time"
+ case 7: fGetTYpe = "Время"
+ case 31: fGetType = "Tijd"
+ case 33: fGetType = "Heure"
+ case 34: fGetType = "Hora"
+ case 36: fGetTYpe = "Idó"
+ case 39: fGetType = "Orario"
+ case 46: fGetType = "Klockslag"
+ case 49: fGetType = "Uhrzeit"
+ case 55: fGetType = "Hora"
+ case 81: fGetType = "時刻"
+ case 82: fGetType = "시간"
+ case 86: fGetType = "时间"
+ case 88: fGetType = "時間"
+ case else :
+ QAErrorLog "Now, the test does not support for the language " +iSprache
+ fGetType = ""
+ end select
+ case else : ' Fallback
+ QAErrorLog "Now, the test does not support for the type -- " &sType
+ fGetType = ""
+ end select
+
+end function
+
+'----------------------------------------------------
+
+function fGetFieldContent( ) as String
+
+ Call fFormatCharacter("TabHyperlinkZeichen")
+ fGetFieldContent = Hinweis.GetText
+ TabHyperlinkZeichen.Cancel
+
+end function
+
+'----------------------------------------------------
+
+function fSetToBigSize( )
+
+ Call fFormatCharacter("TabFont")
+ try
+ SizeWest.Select SizeWest.GetItemCount
+ catch
+ Size.Select Size.GetItemCount
+ endcatch
+ TabFont.OK
+
+end function
+
+
+'----------------------------------------------------
+
+function fGetDirLanguage( ) as String
+
+ 'This function will RETURN language name for
+ 'install directory ,
+ 'eg . $SO_path/share/template/?? <- What you need to know
+ Select case iSprache
+ case 01 : fGetDirLanguage = "en-US" '(English USA)
+ case 31 : fGetDirLanguage = "nl" ' Dutch
+ case 33 : fGetDirLanguage = "fr-FR" '(French)
+ case 34 : fGetDirLanguage = "es-ES" '(Spanish)
+ case 39 : fGetDirLanguage = "it-IT" '(Italian)
+ case 46 : fGetDirLanguage = "sv-SE" '(Swedish)
+ case 49 : fGetDirLanguage = "de-DE" '(German)
+ case 55 : fGetDirLanguage = "pt-BR" '(Portuguese)
+ case 81 : fGetDirLanguage = "ja-JP" '(Japanese)
+ case 82 : fGetDirLanguage = "ko-KR" '(Korean)
+ case 86 : fGetDirLanguage = "zh-CN" '(Simplified Chinese)
+ case 88 : fGetDirLanguage = "zh-TW" '(Traditional Chinese)
+ case else : QAErrorLog "The test does not support the language " + iSprache
+ fGetDirLanguage = "en-US"
+ end select
+
+end function
+
+'----------------------------------------------------
+
+function fGetCategory( ) as String
+
+ 'This function will RETURN Category when inserting from template
+ Select case iSprache
+ case 01 : fGetCategory = "Education"
+ case 31 : fGetCategory = "Opleiding"
+ case 33 : fGetCategory = "Éducation"
+ case 34 : fGetCategory = "Educación"
+ case 39 : fGetCategory = "Formazione"
+ case 46 : fGetCategory = "Utbildning"
+ case 49 : fGetCategory = "Bildung"
+ case 55 : fGetCategory = "Formação"
+ case 81 : fGetCategory = "教養"
+ case 82 : fGetCategory = "�?사 학위 논문"
+ case 86 : fGetCategory = "教育"
+ case 88 : fGetCategory = "教育"
+ case else : QAErrorLog "The test does not support the language " + iSprache
+ end select
+
+end function
+
+'----------------------------------------------------
+
+function fGetStyle( ) as String
+
+ 'This function will RETURN Style when inserting from template
+ Select case iSprache
+ case 01 : fGetStyle = "Master's Thesis"
+ case 33 : fGetStyle = "Mémoire"
+ case 34 : fGetStyle = "Trabajo de licenciatura"
+ case 39 : fGetStyle = "Tesi di laurea"
+ case 46 : fGetStyle = "Examensarbete"
+ case 49 : fGetStyle = "Diplomarbeit"
+ case 55 : fGetStyle = "Dissertação de Mestrado"
+ case 81 : fGetStyle = "�?�業論文"
+ case 82 : fGetStyle = "�?육"
+ case 86 : fGetStyle = "硕士论文"
+ case 88 : fGetStyle = "碩士論文"
+ case else : QAErrorLog "The test does not support the language " + iSprache
+ end select
+
+end function
+
+'----------------------------------------------------
+
+function fGetDate(sDate as String) as String
+
+ Dim sMonth , sDay , sYear as String
+
+ 'This function will RETURN Style when inserting from template
+
+ select case iSystemSprache
+ case 01 :
+ sMonth = Left (sDate , 2)
+ sDay = Mid (sDate , 4 , 2)
+ sYear = Right(sDate , 2)
+ case 49 :
+ sMonth = Mid (sDate , 4 , 2)
+ sDay = Left (sDate , 2)
+ sYear = Right(sDate , 2)
+ case 86 :
+ sMonth = Mid (sDate , 6 , 2)
+ sDay = Right(sDate , 2)
+ sYear = Mid (sDate , 3 , 2)
+ case else:
+
+ end select
+ fGetDate = sMonth & "/" & sDay & "/" & sYear
+
+end function
+
+'----------------------------------------------------
+
+function fGetDate1(sDate as String) as String
+
+ Dim sMonth , sDay , sYear as String
+
+ 'This function will RETURN Style when inserting from template
+
+ select case iSystemSprache
+ case 01 :
+ sMonth = Left (sDate , 2)
+ sDay = Mid (sDate , 4 , 2)
+ sYear = Right(sDate , 4)
+ case 49 :
+ sMonth = Mid (sDate , 4 , 2)
+ sDay = Left (sDate , 2)
+ sYear = Right(sDate , 4)
+ case 86 :
+ sMonth = Mid (sDate , 6 , 2)
+ sDay = Right(sDate , 2)
+ sYear = Left (sDate , 4)
+ case else:
+
+ end select
+ fGetDate1 = sMonth & "/" & sDay & "/" & sYear
+
+end function
+
+'-------------------------------------------------------------------------------------------
+
+function fConvertBacklashToSlash (sTest) as String
+ '/// convert all \ to / , return the string with /
+ '///+ eg, \tmp\test\optional\includes\ ==> /tmp/test/optional/includes/
+
+ Dim i as Integer
+ Dim s1$ : Dim s2$ : Dim s3$
+
+ s1$ = sTest
+
+ 'convert all \ to /
+ do
+ i = InStr( s1$, "\" )
+ if i = 0 then exit do
+ s2$ = Left( s1$ , i-1 )
+ s1$ = Mid( s1$ , i+1 )
+ s3$ = s3$ + s2$ + "/"
+ loop until s1$=""
+ fConvertBacklashToSlash = s3$ + s1$
+
+end function
+
diff --git a/testautomation/writer/tools/includes/w_tools.inc b/testautomation/writer/tools/includes/w_tools.inc
new file mode 100644
index 000000000000..8fa05c23bbc9
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tools.inc
@@ -0,0 +1,1367 @@
+'encoding UTF-8 Do not remove or change this line!
+'*******************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Writer-Tools
+'*
+'\******************************************************************************
+
+sub wDokSchreiben ( OutputText , optional iLoop as Integer )
+ Dim i as integer
+ If lcase(OutputText) = "<mod1 a>" then
+ If iSprache = 34 then OutputText = "<Mod1 E>"
+ end if
+ If IsMissing(iLoop) = True then iLoop = 1
+ For i = 1 to iLoop
+ Select Case Ucase(gApplication)
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys OutputText
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.TypeKeys OutputText
+
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.TypeKeys OutputText
+
+ case "DRAW"
+ Call hTextrahmenErstellen (OutputText,35,35,50,20)
+ case "IMPRESS"
+ Call hTextrahmenErstellen (OutputText,35,35,50,20)
+
+ end select
+ wait 500
+ next i
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wTypeKeys ( OutputText , optional iLoop as Integer )
+ Dim i as integer
+ If lcase(OutputText) = "<mod1 a>" then
+ If iSprache = 34 then OutputText = "<Mod1 E>"
+ end if
+ If IsMissing(iLoop) = True then iLoop = 1
+ For i = 1 to iLoop
+ Select Case Ucase(gApplication)
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys OutputText
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.TypeKeys OutputText
+
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+ DocumentWriterWeb.TypeKeys OutputText
+
+ case "DRAW"
+ Call hTextrahmenErstellen (OutputText,35,35,50,20)
+ case "IMPRESS"
+ Call hTextrahmenErstellen (OutputText,35,35,50,20)
+ end select
+ wait 500
+ next i
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wDocSetContext
+ Select Case Ucase(gApplication)
+ Case "WRITER"
+ Kontext "DocumentWriter"
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+
+ Case "IMPRESS"
+ Kontext "DocumentImpress"
+
+ Case "DRAW"
+ Kontext "DocumentDraw"
+
+ Case "MATH"
+ Kontext "DocumentMath"
+
+ Case "CALC"
+ Kontext "DocumentCalc"
+
+ end select
+ wait 500
+end sub
+
+' -----------------------------------------------------------------------
+
+function wBlindtextEinfuegen() as boolean
+ '/// This functions inserts a Dummytext and returns true if it was inserted
+ Dim BlindText as string, bTemp as boolean
+ bTemp = False
+ select case iSprache
+ case 01 : BlindText = "DT<F3>"
+ case 03 : BlindText = "TE<F3>"
+ case 07 : BlindText = "DT<F3>"
+ case 31 : BlindText = "BT<F3>"
+ case 34 : BlindText = "TE<F3>"
+ case 33 : BlindText = "TEX<F3>"
+ case 39 : BlindText = "TE<F3>"
+ case 45 : BlindText = "ET<F3>"
+ case 46 : BlindText = "BT<F3>"
+ case 48 : BlindText = "TW<F3>"
+ case 49 : BlindText = "BT<F3>"
+ case 55 : BlindText = "TP<F3>"
+ case 81 : BlindText = "DT<F3>"
+ case 82 : BlindText = "BT<F3>"
+ case 86 : BlindText = "DT<F3>"
+ case 88 : BlindText = "BT<F3>"
+ case else : QAErrorlog "No Shortcut for Dummytext available!"
+ end select
+
+ if BlindText > "" then
+ Call wTypeKeys BlindText
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Warnlog Active.Gettext
+ Active.Ok
+ else
+ bTemp = True
+ end if
+ else
+ bTemp = True
+ end if
+ end if
+
+ wBlindtextEinfuegen = bTemp
+
+end function
+
+' -----------------------------------------------------------------------
+
+sub wZeichenobjektEinfuegen ( Objekt$, xStart%, yStart%, xEnde%, yEnde%, optional sCloseToolbar as boolean )
+
+ Kontext "DrawBar"
+ if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
+ Sleep 2
+
+ Objekt = UCase( Objekt )
+ select case Objekt
+ case "RECHTECK" : Rechteck.Click
+ case "LINIE" : Linie.Click
+ case "ELLIPSE" : Ellipse.Click
+ case "TEXT" : Textobjekt.Click
+ case "VTEXT" :
+ try
+ VerticalText.Click
+ catch
+ if gAsianSup = True then
+ Warnlog "Unable to insert Vertical Text! Asian Support in Options activated ?"
+ end if
+ endcatch
+ case "LAUFTEXT" : Lauftext.Click
+ case "LEGENDE" : Legende.Click
+ case "VLEGENDE" :
+ try
+ VerticalCallout.Click
+ catch
+ Warnlog "Unable to insert Vertical Callout! Asian Support in Options activated ?"
+ endcatch
+ end select
+ Sleep (2)
+
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown xStart%, yStart%
+ DocumentWriter.MouseMove xEnde%, yEnde%
+ DocumentWriter.MouseUp xEnde%, yEnde%
+ wait 100
+ Kontext "Drawbar"
+ if IsMissing(sCloseToolbar) then
+ Drawbar.Close
+ else
+ if sCloseToolbar = true then Drawbar.Close
+ end if
+ if Objekt <> "TEXT" and Objekt <> "VTEXT" then
+ Kontext "DocumentWriter"
+ Call gMouseClick (10, 10)
+ wait 100
+ end if
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.MouseDown xStart%, yStart%
+ DocumentMasterDoc.MouseMove xEnde%, yEnde%
+ DocumentMasterDoc.MouseUp xEnde%, yEnde%
+ wait 100
+ Kontext "Drawbar"
+ if IsMissing(sCloseToolbar) then
+ Drawbar.Close
+ else
+ if sCloseToolbar = true then Drawbar.Close
+ end if
+ if Objekt <> "TEXT" and Objekt <> "VTEXT" then
+ Kontext "DocumentMasterDoc"
+ Call gMouseClick (10, 10)
+ wait 100
+ end if
+ end select
+ sleep (1)
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wObjektSelektieren ( xStart%, yStart%, xEnde%, yEnde% )
+ ' Call gMouseClick(90,90)
+ Call hToolbarSelect("DRAWING",true)
+ Auswahl.Click
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDown xStart%, yStart%
+ DocumentWriter.MouseMove xEnde%, yEnde%
+ DocumentWriter.MouseUp xEnde%, yEnde%
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.MouseDown xStart%, yStart%
+ DocumentMasterDoc.MouseMove xEnde%, yEnde%
+ DocumentMasterDoc.MouseUp xEnde%, yEnde%
+ end select
+ wait 200
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wFindSelectObjectBelow ( xStart%, yStart%, xEnde%, yEnde% )
+ WL_TB_ZF_Auswahl
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseMove xStart%, yStart%
+ DocumentWriter.MouseDown xStart%, yStart%
+ DocumentWriter.MouseUp xStart%, yStart%
+
+ do while (Mousepointer<>"Normalpointer")
+ DocumentWriter.MouseMove xEnde%, yEnde%
+ DocumentWriter.MouseDown xEnde%, yEnde%
+ DocumentWriter.MouseUp
+ loop
+
+ i = 1
+ while ((getMouseStyle = 0) AND (i<80))
+ sleep 1
+ inc (i)
+ printlog getMouseStyle
+ if (getMouseStyle <> 0) then i = 80
+ wend
+
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.MouseDown xStart%, yStart%
+ DocumentMasterDoc.MouseMove xEnde%, yEnde%
+ DocumentMasterDoc.MouseUp xEnde%, yEnde%
+ end select
+ wait 200
+end sub
+
+' -----------------------------------------------------------------------
+
+function WortAusWoerterbuchLoeschen ( Aufnahme$ ) as Boolean
+ Dim i as integer : Dim AnzahlBuecher as string
+ Dim j as integer
+
+ ToolsOptions
+ Call hToolsOptions("LanguageSettings","WritingAids")
+ WortAusWoerterbuchLoeschen = FALSE
+ for j = 1 to Benutzerwoerterbuch.GetItemCount
+ try
+ Bearbeiten.Click
+ exit for
+ catch
+ Benutzerwoerterbuch.Select j
+ endcatch
+ next j
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ AnzahlBuecher = Buch.GetItemCount
+
+ for i= 1 to AnzahlBuecher
+ Buch.Select i
+ printlog " - search word in module: " + Buch.GetSelText
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ Inhalt.SetText Aufnahme$
+ Sleep 1
+ if Entfernen.IsEnabled then
+ Entfernen.Click
+ WortAusWoerterbuchLoeschen = TRUE
+ i = AnzahlBuecher + 1
+ end if
+ next i
+ if WortAusWoerterbuchLoeschen = FALSE then Warnlog "The added word has not been found in modules"
+ BenutzerwoerterbuchBearbeiten.Close
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+end function
+
+' -----------------------------------------------------------------------
+
+function wIgnorierenlisteLoeschen
+ Dim i as integer : Dim j as integer : Dim AlleBuecher as integer
+
+ ToolsOptions
+ Call hToolsOptions("LANGUAGESETTINGS","WRITINGAIDS")
+ Sleep 3
+ for j = 1 to Benutzerwoerterbuch.GetItemCount
+ try
+ Bearbeiten.Click
+ exit for
+ catch
+ Benutzerwoerterbuch.Select j
+ endcatch
+ next j
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ sleep 1
+ AlleBuecher = Buch.GetItemCount
+ for i = 1 to AlleBuecher
+ Buch.Select i
+ if Left$(Buch.GetSelText,13)="IgnoreAllList" then
+ sleep 2
+ for j = 1 to 100
+ if Loeschen.IsEnabled then
+ Loeschen.Click
+ sleep 1
+ else
+ Kontext "Active"
+ if Active.Exists then
+ Warnlog Active.Gettext
+ Active.Ok
+ end if
+ Kontext "BenutzerwoerterbuchBearbeiten"
+ BenutzerwoerterbuchBearbeiten.Cancel
+ sleep 1
+ j=101
+ end if
+ wait 500
+ next j
+ i=AlleBuecher + 1
+ end if
+ next i
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+end function
+
+' -----------------------------------------------------------------------
+
+sub hLeisteUmschalten(welche as integer)
+ Sleep 2
+ Select Case welche
+ case 1:
+ try ' Textobjectbar
+ Kontext "NumObjectbar"
+ NumObjectbar.SetNextToolbox
+ catch
+ endcatch
+ Sleep 1
+ if gApplication = "HTML" then
+ Kontext "TextObjectbar"
+ else
+ Kontext "TextObjectbar"
+ end if
+ Sleep 1
+ try
+ Fett.Click ' Sonst sind Comboboxen fȭr Testtool nicht sichtbar
+ Sleep 1
+ Fett.Click
+ catch
+ Warnlog "Error on switching the function bar!"
+ endcatch
+ Sleep 1
+
+ case 2:
+ Select Case gApplication
+ ' Numbering-Objectbar
+ Case "HTML"
+ Kontext "TextObjectbar"
+ try
+ TextObjectbar.SetNextToolbox
+ catch
+ endcatch
+
+ Case else
+ Kontext "TextObjectbar"
+ try
+ TextObjectbar.SetNextToolbox
+ catch
+ endcatch
+ end select
+ Sleep 1
+ Kontext "NumObjectbar"
+ try
+ Hinunterstufen.Click
+ catch
+ try
+ Hochstufen.Click
+ catch
+ Warnlog "Error on switching the function bar!"
+ endcatch
+ endcatch
+ Sleep 2
+ end select
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hGrafikleisteUmschalten(welche as integer)
+ Select Case welche
+ case 1:
+ try
+ Kontext "GraphicObjectbar"
+ Wait 500
+ GraphicObjectbar.SetNextToolBox
+ catch
+ endcatch
+ Kontext "FrameObjectbar"
+ Sleep 1
+
+ case 2:
+ try
+ Kontext "FrameObjectbar"
+ Wait 500
+ FrameObjectbar.SetNextToolBox
+ catch
+ endcatch
+ Kontext "GraphicObjectbar"
+ Sleep 1
+ end select
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wEinfuegenHyperlink(welcheSeite as integer)
+ Kontext "Hyperlink"
+ Auswahl.MouseDown 2,2
+ Auswahl.MouseUp 2,2
+ wait 500
+ Auswahl.TypeKeys "<Down>",1
+ wait 500
+ Auswahl.TypeKeys "<Up>",4
+ Sleep 1
+
+ Select case welcheSeite
+ case 1:
+ Kontext "TabHyperlinkInternet"
+
+ case 2:
+ Auswahl.TypeKeys "<Down>",1
+ Kontext "TabHyperlinkMailUndNews"
+
+ case 3:
+ Auswahl.TypeKeys "<Down>",2
+ Kontext "TabHyperlinkDokument"
+
+ case 4:
+ Auswahl.TypeKeys "<Down>",3
+ Kontext "TabHyperlinkNeuesDokument"
+
+ end select
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wNavigatorAuswahl(Gruppe as integer, Eintrag as integer,optional LeaveFocus as boolean)
+ dim j as integer, WelcherEintrag as integer
+ Dim MinEntrys as integer
+
+ If IsMissing(LeaveFocus) = True then LeaveFocus = False
+
+ Select Case Ucase(gApplication)
+ Case "CALC"
+ Kontext "NavigatorCalc"
+ if NavigatorCalc.NotExists then ViewNavigator
+ wait 500
+ Kontext "NavigatorCalc"
+ MinEntrys = 8
+ Case "WRITER", "HTML", "HTML"
+ Kontext "NavigatorWriter"
+ if NavigatorWriter.NotExists then ViewNavigator
+ wait 500
+ Kontext "NavigatorWriter"
+ MinEntrys = 11
+ Case "MASTERDOCUMENT"
+ Kontext "NavigatorGlobalDoc"
+ if NavigatorGlobalDoc.NotExists then ViewNavigator
+ wait 500
+ Kontext "NavigatorGlobalDoc"
+ if Liste.IsVisible then
+ Kontext "GlobaldokumentToolbox"
+ Umschalten.Click
+ Kontext "NavigatorWriter"
+ end if
+ MinEntrys = 11
+ Case Else ' for all others!!!!
+ Warnlog "Not supported application!"
+ exit sub
+ end select
+
+ Sleep 2
+
+ Select Case Ucase(gApplication)
+ Case "CALC"
+ if (Liste.GetItemCount < MinEntrys) then Umschalten.Click
+ if Liste.GetItemCount >MinEntrys then
+ For j= 1 to 9
+ Liste.Select j
+ Liste.TypeKeys "-"
+ next j
+ end if
+
+ Liste.Select Gruppe
+ if Eintrag >0 then
+ WelcherEintrag = Gruppe + Eintrag
+ Liste.TypeKeys "+"
+ Liste.Select WelcherEintrag
+ Liste.TypeKeys "<Return>"
+ end if
+
+ Case "WRITER","HTML", "HTML"
+ if (Auswahlliste.GetItemCount < MinEntrys) then
+ try
+ Inhaltsansicht.Click
+ catch
+ endcatch
+ end if
+ if Auswahlliste.GetItemCount >MinEntrys then
+ For j= 1 to 12
+ Auswahlliste.Select j
+ Auswahlliste.TypeKeys "-"
+ next j
+ end if
+
+ Auswahlliste.Select Gruppe
+ if Eintrag >0 then
+ WelcherEintrag = Gruppe + Eintrag
+ Auswahlliste.TypeKeys "+"
+ Auswahlliste.Select WelcherEintrag
+ Auswahlliste.TypeKeys "<Return>"
+ end if
+
+ Case "MASTERDOCUMENT"
+ if Liste.IsVisible = True then
+ Umschalten.Click
+ end if
+
+ if Auswahlliste.GetItemCount >MinEntrys then
+ For j= 1 to 12
+ Auswahlliste.Select j
+ Auswahlliste.TypeKeys "-"
+ next j
+ end if
+
+ Auswahlliste.Select Gruppe
+ if Eintrag >0 then
+ WelcherEintrag = Gruppe + Eintrag
+ Auswahlliste.TypeKeys "+"
+ Auswahlliste.Select WelcherEintrag
+ Auswahlliste.TypeKeys "<Return>"
+ end if
+ end select
+
+ if LeaveFocus = False then
+ Select Case Ucase(gApplication)
+ Case "CALC"
+ Kontext "DocumentCalc"
+ Case "HTML", "HTML"
+ Kontext "DocumentWriter"
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ end select
+ end if
+end sub
+
+' ---------------------------------------------------------------
+
+function wNavigatorClose
+ '/// Close Navigator
+ Kontext "Navigator"
+ if Navigator.Exists(2) then
+ Navigator.Close
+ WaitSlot()
+ end if
+end function
+
+' ---------------------------------------------------------------
+
+sub wClearDocument
+ Dim i as integer : Dim j as integer
+ '/// Remove all Text, Drawing-objects or Objects from document ///
+ Call wTypeKeys "<PageUp><Home>"
+ Call wTypeKeys "<Backspace>",5
+ DocumentWriter.MouseDown ( 30,30 )
+ DocumentWriter.MouseMove ( 75,60 )
+ wait 500
+ DocumentWriter.MouseUp ( 75, 60 )
+ Sleep 1
+ Call wTypeKeys "<Delete>"
+ Sleep 3
+
+ Kontext "NavigatorWriter"
+ if Not NavigatorWriter.Exists then ViewNavigator
+ wait 500
+
+ Kontext "NavigatorWriter"
+ if Auswahlliste.GetItemCount <11 then Inhaltsansicht.Click ' Grundzustand
+
+ if Auswahlliste.GetItemCount >11 then
+ For j= 1 to 12
+ Auswahlliste.Select j
+ Auswahlliste.TypeKeys "-"
+ next j
+ end if
+ wait 500
+ for i = 1 to 12
+ Auswahlliste.Select i
+ Auswahlliste.TypeKeys "+"
+ if Auswahlliste.GetItemCount > 11 then
+ for j = 1 to 5 ' maximal 5 Elemente in einer Gruppe
+ Auswahlliste.TypeKeys "<Down>"
+ Auswahlliste.TypeKeys "<Delete>"
+ wait 500
+ if Auswahlliste.GetItemCount > 11 then Auswahlliste.Select i
+ next j
+ end if
+ next i
+ if j= 5 then Warnlog "Try another way to clear page !"
+
+ Kontext "Navigator"
+ try
+ Navigator.Close
+ catch
+ Errorlog
+ ViewNavigator
+ endcatch
+
+ try
+ Call wTypeKeys "<Mod1 A>"
+ catch
+ endcatch
+ Call wTypeKeys "<Delete>"
+ DocumentWriter.MouseDown ( 50,10 )
+ DocumentWriter.MouseUp ( 50,10 )
+ Sleep 2
+ Call wTypeKeys "<Home><PageUp>"
+ Sleep 5
+end sub
+
+' ---------------------------------------------------------------
+
+sub wMarkObjects(delete as boolean)
+ ' The drawing objects has to be selected before deleting them
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ Case "HTML"
+ Kontext "DocumentWriterWeb"
+ end select
+
+ Call gMouseClick 50,50
+ Call wTypeKeys "<PageUp><Home>"
+ Call wTypeKeys "<Backspace>",5
+ Call gMouseClick 50,50
+ Select Case gApplication
+ Case "WRITER"
+ DocumentWriter.TypeKeys "<Shift F4>"
+
+ Case "MASTERDOCUMENT"
+ DocumentMasterDoc.TypeKeys "<Shift F4>"
+
+ Case "HTML"
+ DocumentWriterWeb.TypeKeys "<Shift F4>"
+ end select
+
+ Sleep 1
+ if delete = TRUE then
+ Call wTypeKeys "<Delete>"
+ Sleep 3
+ end if
+end sub
+
+' -----------------------------------------------------------------------
+
+sub hExportUmstellung ( WasDenn as Boolean )
+ if Ucase(gApplication) = "HTML" then
+ ToolsOptions
+ Call hToolsOptions("LoadSave","HTMLCompatibility")
+ if WasDenn = TRUE then
+ 'Select Case iSprache
+ ' Case 81 : Export.Select "Microsoft Internet Explorer 4.0"
+ ' Case else : Export.Select "MS Internet Explorer 4.0"
+ 'end select
+ try
+ Export.Select "Microsoft Internet Explorer"
+ catch
+ Warnlog "Unable to choose browser for export !"
+ endcatch
+ else
+ Export.Select "Netscape Navigator"
+ end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+ end if
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wSetMacroSecurityLevel ( wLevel as integer ) as boolean
+ ToolsOptions
+ Call hToolsOptions("StarOffice","Security")
+ wSetMacroSecurityLevel = False
+ try
+ MacroSecurity.Click
+ catch
+ Warnlog "Unable to set macro security level (Button 'Macro Security' not found)"
+ Goto EarlyExit
+ endcatch
+
+ Kontext
+ Active.SetPage TabSecurityLevel
+ Kontext "TabSecurityLevel"
+
+ Select Case wLevel
+ Case 1: VeryHigh.Check
+ Case 2: High.Check
+ Case 3: Medium.Check
+ Case 4: Low.Check
+ Case else: Warnlog "Wrong level number entered. Unknown"
+ goto EarlyExit
+ end select
+ TabSecurityLevel.Ok
+ wSetMacroSecurityLevel = True
+
+ EarlyExit:
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wInsertFrame
+ InsertFrame
+ Kontext
+ Active.SetPage TabType
+ Kontext "TabType"
+ TabType.OK
+ Sleep 3
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wRectangleToClipboard
+ Dim tempApplication as string
+ tempApplication = gApplication
+ gApplication = "DRAW"
+ Call hNewDocument
+ Call hRechteckErstellen ( 45, 45, 60, 60 )
+ ' select the drawn object
+ try
+ EditSelectAll
+ catch
+ warnlog "Unable to select object. Maybe not drawn!"
+ endcatch
+ ' copy the selected object
+ try
+ EditCopy
+ catch
+ Warnlog "Unable to copy object. Maybe not selected!"
+ endcatch
+
+ Call hCloseDocument
+ gApplication = tempApplication
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ Case "MASTERDOCUMENT"
+ Kontext "DocumentMasterDoc"
+ end select
+ Call gMouseClick 10,10
+end sub
+
+' -----------------------------------------------------------------------
+
+sub wRectangleToClipboardHTML
+ gApplication = "DRAW"
+ Call hNewDocument
+ Call hRechteckErstellen ( 45, 45, 60, 60 )
+ EditSelectAll
+ EditCopy
+ Call hCloseDocument
+ gApplication = "HTML"
+ Kontext "DocumentWriterWeb"
+ Call gMouseClick
+end sub
+
+' -----------------------------------------------------------------------
+
+function MachMirDenEintrag(WoDenn as integer,WieLang as integer, optional Welches as string)
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<Down>",WoDenn
+ Call wTypeKeys "<Mod1 Shift Right>" , WieLang
+ Kontext "VerzeichniseintragEinfuegen"
+ if Welches > "" then
+ Select case Welches
+ case "Inhalt" : Verzeichnis.Select 1
+ case "Stich" : Verzeichnis.Select 2
+ case "Benutz" : Verzeichnis.Select 3
+ end select
+ end if
+ Verzeichniseintrag.TypeKeys "<Up>"
+ Wait 500
+ EintragOk.Click
+end function
+
+' -----------------------------------------------------------------------
+
+sub wOptionsUndo ( sOption$ )
+ Dim i as integer
+ Dim sTempSeparator as string
+ Dim sTempUnit as integer
+
+ Printlog " - Initial state"
+
+ Call hNewDocument
+
+ Kontext "ExtrasOptionenDlg"
+ if Not ExtrasOptionenDlg.Exists then
+ ToolsOptions
+ end if
+
+ Call hToolsOptions("WRITER","General")
+ if Instr(Tabulatorenabstand.Gettext, ",") then
+ sTempSeparator = ","
+ else
+ sTempSeparator = "."
+ end if
+ sTempUnit = Masseinheit.GetSelIndex
+
+ if sOption$ = "Laden" OR sOption$ = "All" then
+ ' Update
+ AufNachfrage.Check
+ Feldbefehle.Check
+ Diagramme.Uncheck
+ ' Settings
+ Select Case sTempUnit
+ Case 1: 'Millimeter
+ Tabulatorenabstand.Settext "12" & sTempSeparator & "51"
+ Case 2: ' Centimeter
+ Tabulatorenabstand.Settext "1" & sTempSeparator & "25"
+ Case 3: ' Inch
+ Tabulatorenabstand.Settext "0" & sTempSeparator & "49"
+ Case 4: ' Pica
+ Tabulatorenabstand.Settext "2" & sTempSeparator & "95"
+ Case 5: ' Point
+ Tabulatorenabstand.Settext "35" & sTempSeparator & "5"
+ end select
+ end if
+
+ Call hToolsOptions("WRITER","View")
+ if sOption$ = "Inhalte" OR sOption$ = "All" then
+ ' Guides
+ Hilfslinien.Uncheck
+ FarbigeHandles.Check
+ GrosseHandles.Uncheck
+ ' View
+ HorizontaleBildlaufleiste.Check
+ VertikaleBildlaufleiste.Check
+ Lineal.Check
+ HorizontalesLineal.Check
+ VertikalesLineal.Check
+ WeichesScrollen.Uncheck
+ ' Display
+ GrafikenUndObjekte.Check
+ Zeichnungen.Check
+ Feldname.Uncheck
+ Notizen.Check
+ end if
+
+ if sOption$ = "Cursor" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","FormattingAids")
+ ' Display of
+ Absatzenden.UnCheck
+ WeicheTrenner.Check
+ Leerzeichen.UnCheck
+ GeschLeerzeichen.Check
+ Tabulatoren.UnCheck
+ Umbrueche.UnCheck
+ VersteckterText.Uncheck
+ VersteckteAbsatze.Check
+ 'Direct-Cursor
+ DirektCursor.Uncheck
+ Absatzausrichtung.Check
+ 'Cursor in protected areas
+ Zonen_Cursor.Check
+ end if
+
+ if sOption$ = "Raster" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","Grid")
+ ' Grid
+ FangrasterBenutzen.Uncheck
+ RasterSichtbar.Uncheck
+ ' Resolution
+ AchsenSynchronisieren.Uncheck
+ Select Case sTempUnit
+ Case 1: 'Millimeter
+ RasterAufloesungXAchse.SetText "10" & sTempSeparator & "00"
+ RasterAufloesungYAchse.SetText "10" & sTempSeparator & "00"
+ Case 2: ' Centimeter
+ RasterAufloesungXAchse.SetText "1" & sTempSeparator & "00"
+ RasterAufloesungYAchse.SetText "1" & sTempSeparator & "00"
+ Case 3: ' Inch
+ RasterAufloesungXAchse.SetText "0" & sTempSeparator & "39"
+ RasterAufloesungYAchse.SetText "0" & sTempSeparator & "39"
+ Case 4: ' Pica
+ RasterAufloesungXAchse.SetText "2" & sTempSeparator & "36"
+ RasterAufloesungYAchse.SetText "2" & sTempSeparator & "36"
+ Case 5: ' Point
+ RasterAufloesungXAchse.SetText "28" & sTempSeparator & "3"
+ RasterAufloesungYAchse.SetText "28" & sTempSeparator & "3"
+ end select
+ RasterUnterteilungXAchse.ToMin
+ RasterUnterteilungXAchse.More 1
+ RasterUnterteilungYAchse.ToMin
+ RasterUnterteilungYAchse.More 1
+ end if
+
+ if sOption$ = "Grundschriften" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","BasicFonts")
+ Standard.Click
+ AktuellesDokument.Uncheck
+ end if
+
+ if sOption$ = "Drucken" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","Print")
+ ' Contents
+ Grafiken.Check
+ Kontrollfelder.Check
+ Hintergrund.Check
+ SchwarzDrucken.Uncheck
+ ' Pages
+ LinkeSeiten.Check
+ RechteSeiten.Check
+ Prospekt.Uncheck
+ ' Notes
+ Keine.Check
+ ' Other
+ LeereSeitenDrucken.Check
+ AusDruckereinstellung.Uncheck
+ Fax.SetNoSelection
+ end if
+
+ if sOption$ = "Tabelle" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","Table")
+ ' Default
+ Ueberschrift.Check
+ Wiederholen.Check
+ NichtTrennen.Uncheck
+ Umrandung.Check
+ ' Input in Tables
+ AutomatischeZahlenerkennung.Check
+ Zahlenformaterkennung.Check
+ AutomatischeAusrichtung.Check
+ AutomatischeZahlenerkennung.UnCheck
+ ' Keyboard handling
+ Select Case sTempUnit
+ Case 1: 'Millimeter
+ VerschiebenZeile.SetText "4" & sTempSeparator & "99"
+ VerschiebenSpalte.SetText "4" & sTempSeparator & "99"
+ EinfuegenZeile.SetText "4" & sTempSeparator & "99"
+ EinfuegenSpalte.SetText "24" & sTempSeparator & "99"
+ Case 2: ' Centimeter
+ VerschiebenZeile.SetText "0" & sTempSeparator & "50"
+ VerschiebenSpalte.SetText "0" & sTempSeparator & "50"
+ EinfuegenZeile.SetText "0" & sTempSeparator & "50"
+ EinfuegenSpalte.SetText "2" & sTempSeparator & "50"
+ Case 3: ' Inch
+ VerschiebenZeile.SetText "0" & sTempSeparator & "20"
+ VerschiebenSpalte.SetText "0" & sTempSeparator & "20"
+ EinfuegenZeile.SetText "0" & sTempSeparator & "20"
+ EinfuegenSpalte.SetText "0" & sTempSeparator & "98"
+ Case 4: ' Pica
+ VerschiebenZeile.SetText "1" & sTempSeparator & "18"
+ VerschiebenSpalte.SetText "1" & sTempSeparator & "18"
+ EinfuegenZeile.SetText "1" & sTempSeparator & "18"
+ EinfuegenSpalte.SetText "5" & sTempSeparator & "90"
+ Case 5: ' Point
+ VerschiebenZeile.SetText "14" & sTempSeparator & "2"
+ VerschiebenSpalte.SetText "14" & sTempSeparator & "2"
+ EinfuegenZeile.SetText "14" & sTempSeparator & "2"
+ EinfuegenSpalte.SetText "70" & sTempSeparator & "9"
+ end select
+ Sleep 1
+ ' Behaviour of rows/columns
+ Variabel.Check
+ end if
+
+ if sOption$ = "Aenderung" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","Changes")
+ ' Text display
+ EinfuegenAttribute.Select 4
+ EinfuegenFarbe.Select 2
+ LoeschenAttribute.Select 4
+ LoeschenFarbe.Select 2
+ AendernAttribute.Select 2
+ AendernFarbe.Select 2
+ ' Lines changed
+ Zeilenmarkierung.Select 2
+ Zeilenfarbe.Select 1
+ end if
+
+ if sOption$ = "AutoCaption" OR sOption$ = "All" then
+ Call hToolsOptions("WRITER","Autocaption")
+ for i = 1 to ObjectList.GetItemCount
+ ObjectList.Select i
+ ObjectList.UnCheck
+ next i
+ end if
+
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
+
+ Call hCloseDocument
+end sub
+
+' -----------------------------------------------------------------------
+
+function wInsertDocumentinMasterDoc(DocumentName as string) as boolean
+ Call hNewDocument
+ Call hFileOpen(DocumentName)
+ Sleep 2
+ Call wTypeKeys "<Mod1 A>"
+ Sleep 2
+ EditCopy
+ Call hCloseDocument
+ wInsertDocumentinMasterDoc = True
+end function
+
+' -----------------------------------------------------------------------
+
+function CheckForFilters() as boolean
+ Kontext "GraphicFilterBar"
+ if not GraphicFilterBar.Exists then
+ Warnlog "- Toolbox has been closed!"
+ Kontext "GraphicObjectbar"
+ if Filter.IsEnabled then
+ GraphicObjectbar.TearOff Filter
+ Kontext "GraphicFilterBar"
+ GraphicFilterBar.Move ( 20, 20 )
+ CheckForFilters = True
+ else
+ Warnlog "- Though graphic is selected, the filter button in objectbar is disabled!"
+ Select Case gApplication
+ Case "WRITER"
+ Kontext "DocumentWriter"
+ DocumentWriter.MouseDoubleClick 10,10
+ DocumentWriter.MouseDown 50,20
+ DocumentWriter.MouseUp 50,20
+ case else
+ Kontext "DocumentMasterDoc"
+ DocumentMasterDoc.MouseDoubleClick 10,10
+ DocumentMasterDoc.MouseDown 50,20
+ DocumentMasterDoc.MouseUp 50,20
+ end select
+ Wait 500
+ Kontext "GraphicObjectbar"
+ if Filter.IsEnabled then
+ GraphicObjectbar.TearOff Filter
+ Kontext "GraphicFilterBar"
+ GraphicFilterBar.Move ( 20, 20 )
+ CheckForFilters = True
+ else
+ Warnlog "- Reselecting the graphic didn't enable the button in the toolbar! No further test!"
+ CheckForFilters = False
+ end if
+ end if
+ else
+ CheckForFilters=True
+ end if
+ Kontext "GraphicFilterBar"
+end function
+
+' -----------------------------------------------------------------------
+
+sub hInsertFloatingFrame
+ Sleep 3
+ InsertFloatingFrame
+ Sleep 3
+ Kontext "TabEigenschaften"
+ FrameName.SetText "Hallo"
+ TabEigenschaften.OK
+ Sleep 2
+ Kontext "OeffnenDlg"
+ if OeffnenDlg.Exists(2) then OeffnenDlg.Cancel
+end sub
+
+' -----------------------------------------------------------------------
+
+function wStyleCreate( sStyleName as string, sType as string, optional NotFromSelection as boolean ) as boolean
+ '/// This function creates a new style through stylist
+
+ Kontext "Stylist"
+ If Not Stylist.Exists then FormatStylist
+
+ select case sType
+ case "Paragraph": Absatzvorlagen.Click
+ case "Character": Zeichenvorlagen.Click
+ case "Frame": Rahmenvorlagen.Click
+ case "Page": Seitenvorlagen.Click
+ case "Numbering": Numerierungsvorlagen.Click
+ end select
+
+ if IsMissing ( NotFromSelection ) then
+ wait 500
+ AusSelektion.OpenMenu
+ Sleep 1
+ Call hMenuSelectNr(1)
+ Sleep 1
+ wait 500
+ Kontext "VorlageErzeugen"
+ Vorlagenname.Settext sStyleName
+ VorlageErzeugen.Ok
+ else
+ if NotFromSelection = true then
+ VorlagenListe.TypeKeys "<Mod1 End>"
+ Vorlagenliste.TypeKeys "<Mod1 Home>"
+ Vorlagenliste.OpenContextMenu
+ Sleep 1
+ Call hMenuSelectNr(1)
+ wait 500
+ Kontext
+ Active.SetPage TabVerwalten
+ wait 500
+ Kontext "TabVerwalten"
+ VorlagenName.SetText sStyleName
+ wait 500
+ TabVerwalten.OK
+ end if
+ end if
+
+ Kontext "Stylist"
+
+ if wStyleSelect ( sStyleName, sType ) = true then
+ wStyleCreate = False
+ else
+ wStyleCreate = True
+ end if
+ Stylist.Close
+end function
+
+' -----------------------------------------------------------------------
+
+function wStyleSelect( sStyleName as string, optional sType as string ) as boolean
+ '/// This function selects a given style in Stylist
+ '/// function leaves Stylist opened
+
+ Dim i as integer
+
+ Kontext "Stylist"
+ If Not Stylist.Exists then FormatStylist
+
+ wait 500
+ Gruppenliste.Select 2 '-> 'All Styles' has to be selected
+ wait 500
+ if IsMissing (sType) then
+ Absatzvorlagen.Click
+ else
+ select case sType
+ case "Paragraph": Absatzvorlagen.Click
+ case "Character": Zeichenvorlagen.Click
+ case "Frame": Rahmenvorlagen.Click
+ case "Page": Seitenvorlagen.Click
+ case "Numbering": Numerierungsvorlagen.Click
+ end select
+ end if
+
+ Sleep 1
+ Vorlagenliste.Select 1
+ wait 500
+ if Vorlagenliste.GetSelText <> sStyleName then
+ For i = 1 to 200
+ if Vorlagenliste.GetSelText = sStyleName then
+ wStyleSelect = true
+ i = 202
+ else
+ Vorlagenliste.TypeKeys "<Down>"
+ end if
+ next i
+ if i = 202 then wStyleSelect = true
+ else
+ wStyleSelect = true
+ end if
+
+end function
+
+' -----------------------------------------------------------------------
+
+function wStyleDelete ( sStyleName as string, sType as string ) as boolean
+ '/// This function selects a given style in Stylist
+ '/// function leaves Stylist opened
+
+ Dim i as integer
+
+ Kontext "Stylist"
+ If Not Stylist.Exists then FormatStylist
+
+ select case sType
+ case "Paragraph": Absatzvorlagen.Click
+ case "Character": Zeichenvorlagen.Click
+ case "Frame": Rahmenvorlagen.Click
+ case "Page": Seitenvorlagen.Click
+ case "Numbering": Numerierungsvorlagen.Click
+ end select
+
+ Vorlagenliste.TypeKeys "<Mod1 End>"
+ Vorlagenliste.TypeKeys "<Mod1 Home>"
+ if Vorlagenliste.GetSelText <> sStyleName then
+ For i = 1 to 200
+ if Vorlagenliste.GetSelText = sStyleName then
+ Vorlagenliste.OpenContextMenu
+ Sleep 1
+ Call hMenuSelectNr(3)
+ wait 500
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Yes
+ i = 203
+ end if
+ end if
+ else
+ Vorlagenliste.TypeKeys "<Down>"
+ end if
+ next i
+ if i = 204 then wStyleDelete = true
+ else
+ Vorlagenliste.OpenContextMenu
+ Sleep 1
+ Call hMenuSelectNr(3)
+ wait 500
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ Active.Yes
+ end if
+ end if
+ wStyleDelete = true
+ end if
+
+end function
+
+' -----------------------------------------------------------------------
+
+function wStyleSet( sStyleName as string, optional sType as string ) as boolean
+ '/// This function sets a given style in Stylist
+ '/// function leaves Stylist opened
+
+ Dim i as integer
+
+ Kontext "Stylist"
+ If Not Stylist.Exists then FormatStylist
+
+ wait 500
+ Gruppenliste.Select 2 '-> 'All Styles' has to be selected
+ wait 500
+ if IsMissing (sType) then
+ Absatzvorlagen.Click
+ else
+ select case sType
+ case "Paragraph": Absatzvorlagen.Click
+ case "Character": Zeichenvorlagen.Click
+ case "Frame": Rahmenvorlagen.Click
+ case "Page": Seitenvorlagen.Click
+ case "Numbering": Numerierungsvorlagen.Click
+ end select
+ end if
+
+ Sleep 1
+ Vorlagenliste.Select 1
+ wait 500
+ if Vorlagenliste.GetSelText <> sStyleName then
+ For i = 1 to 200
+ if Vorlagenliste.GetSelText = sStyleName then
+ wStyleSet = true
+ Vorlagenliste.TypeKeys "<Return>"
+ exit for
+ else
+ Vorlagenliste.TypeKeys "<Down>"
+ end if
+ next i
+ else
+ wStyleSet = true
+ end if
+
+end function
+
+' -----------------------------------------------------------------------
+
+function wStyleGet( sStyleName as string, optional sType as string ) as boolean
+ '/// This function checks if a given style is selected in Stylist
+ '/// function leaves Stylist opened
+
+ Dim i as integer
+
+ Kontext "Stylist"
+ If Not Stylist.Exists then FormatStylist
+
+ wait 500
+ Gruppenliste.Select 2 '-> 'All Styles' has to be selected
+ wait 500
+ if IsMissing (sType) then
+ Absatzvorlagen.Click
+ else
+ select case sType
+ case "Paragraph": Absatzvorlagen.Click
+ case "Character": Zeichenvorlagen.Click
+ case "Frame": Rahmenvorlagen.Click
+ case "Page": Seitenvorlagen.Click
+ case "Numbering": Numerierungsvorlagen.Click
+ end select
+ end if
+
+ wait 500
+ if Vorlagenliste.GetSelText = sStyleName then
+ wStyleGet = true
+ end if
+
+end function
diff --git a/testautomation/writer/tools/includes/w_tools_autocorrection.inc b/testautomation/writer/tools/includes/w_tools_autocorrection.inc
new file mode 100644
index 000000000000..71a183527ed6
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tools_autocorrection.inc
@@ -0,0 +1,157 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Test the AutoCorrect/AutoFormat/Word tools
+'*
+'************************************************************************
+'*
+' #0 fFormatCharacter
+'*
+'\***********************************************************************
+
+function fAutocorrectOptions(Options as String, iModify as integer, iType as integer)
+ '/// Open Tools/Autocorrect/Autoformat diglog with tab page Options
+ '///+ then choose the relevant Options and press 'space bar'
+ Dim iDown as integer
+
+ ToolsAutocorrect
+ Kontext
+ Active.Setpage TabOptionenAutokorrektur
+ Kontext "TabOptionenAutokorrektur"
+
+ Select case Options
+ case "UseReplacementTable" : iDown = 1
+ case "CorrectTWoINitialCApitals" : iDown = 2
+ case "CapitalizeFirstLetter" : iDown = 3
+ case "AutomaticBoldAndUnderline" : iDown = 4
+ case "URLRecognition" : iDown = 5
+ case "ReplaceDashes" : iDown = 6
+ case "DeleteSpaceParagraph" : iDown = 7
+ case "DeleteSpaceLine" : iDown = 8
+ case "IgnoreDoubleSpaces" : iDown = 9
+ case "ApplyNumbering" : iDown = 10
+ case "ApplyBorder" : iDown = 11
+ case "CreateTable" : iDown = 12
+ case "ApplyStyles" : iDown = 13
+ case "RemoveBlankParagraphs" : iDown = 14
+ case "ReplaceCustomStyles" : iDown = 15
+ case "ReplaceBullets" : iDown = 16
+ case "CombineSingleLine" : iDown = 17
+ end select
+
+ ' *** Set requested state ***
+ ' ### Modify
+ Select Case iDown
+ Case 1,2,3,4,5,6,7,8,14,15,16,17
+ if iModify = 1 then
+ Einstellungen.Check(iDown,2)
+ else
+ Einstellungen.UnCheck(iDown,2)
+ endif
+ if iDown < 9 then
+ ' ### Type
+ if iType = 1 then
+ Einstellungen.Check(iDown,3)
+ else
+ Einstellungen.UnCheck(iDown,3)
+ endif
+ endif
+ Case 9,10,11,12,13
+ ' ### Type
+ if iType = 1 then
+ Einstellungen.Check(iDown,3)
+ else
+ Einstellungen.UnCheck(iDown,3)
+ endif
+ end select
+ wait 100
+ TabOptionenAutokorrektur.OK
+
+end function
+
+'---------------------------------------------------------------
+
+function fFormatCharacter(Options as string)
+ '/// Open format/character diglog with Options.
+ Kontext
+ FormatCharacter
+
+ Select case Options
+ case "TabFont" : active.SetPage TabFont
+ case "TabFontEffects" : active.SetPage TabFontEffects
+ case "TabFontPosition" : active.SetPage TabFontPosition
+ case "TabHyperlinkZeichen" : active.SetPage TabHyperlinkZeichen
+ case "TabHintergrund" : active.SetPage TabHintergrund
+ end select
+
+ Kontext Options
+
+end function
+
+'-------------------------------------------------------------------------
+
+function fFormatParagraph(Options as string)
+ '/// Open format/paragraph diglog with Options
+ Kontext
+ FormatParagraph
+
+ Select case Options
+ case "TabUmrandung" : active.SetPage TabUmrandung 'Borders
+ case "TabEinzuegeUndAbstaende" : active.SetPage TabEinzuegeUndAbstaende 'Indents & Spacing
+ end select
+
+ Kontext Options
+
+end function
+
+'-------------------------------------------------------------------------
+
+function fDeleteAllEntries()
+ '/// This function is to delete all entries in tools/autocorrect/Word completions.
+ Dim i as Integer
+
+ ToolsAutocorrect
+ Kontext
+ Active.Setpage TabWortergaenzung
+ Kontext "TabWortergaenzung"
+
+ if GesammelteWorte.GetItemCount > 0 then
+ for i= 1 to GesammelteWorte.GetItemCount
+ GesammelteWorte.Select 1
+ if EintragLoeschen.IsEnabled then
+ EintragLoeschen.Click
+ else
+ i = GesammelteWorte.GetItemCount + 1
+ end if
+ next i
+ end if
+
+ TabWortergaenzung.OK
+end function
+
diff --git a/testautomation/writer/tools/includes/w_tools_drawing.inc b/testautomation/writer/tools/includes/w_tools_drawing.inc
new file mode 100644
index 000000000000..1a1a8ed7975d
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tools_drawing.inc
@@ -0,0 +1,68 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Test the AutoCorrect/AutoFormat/Word tools
+'*
+'************************************************************************
+'*
+' #0 fPositionAndSize
+'*
+'\***********************************************************************
+
+function fPositionAndSize(Options as string)
+ '/// Open Format/Position and Size diglog with Options.
+ 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
+
+'-------------------------------------------------------------------------
+
+function fFormatLine(Options as string)
+ '/// Open Format/Line with Options.
+ Kontext
+ FormatLine
+
+ Select case Options
+ case "TabLinie" : active.SetPage TabLinie
+ case "TabLinienstile" : active.SetPage TabLinienstile
+ case "TabLinienenden" : active.SetPage TabLinienenden
+ end Select
+
+ Kontext Options
+end function
+
+'-------------------------------------------------------------------------
diff --git a/testautomation/writer/tools/includes/w_tools_hyphenation.inc b/testautomation/writer/tools/includes/w_tools_hyphenation.inc
new file mode 100644
index 000000000000..067aeec3cfca
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tools_hyphenation.inc
@@ -0,0 +1,79 @@
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/******************************************************************
+'* **
+'* owner : helge.delfs@sun.com **
+'* **
+'* short description : Misc tools for writer hyphenation tests **
+'* **
+'\******************************************************************
+
+
+
+function fPrepareHyphenationDocument(testWord as string)
+
+ Dim SpaceTickCount as integer
+
+ SpaceTickCount = 1
+ Do
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>"
+ Call wTypeKeys "<Mod1 Shift Right>"
+ try
+ EditCopy
+ catch
+ endcatch
+ if trim(GetClipboardText) <> testWord then
+ EditSearchAndReplace
+ Kontext "FindAndReplace"
+ SearchFor.SetText testWord
+ SearchNow.Click
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ active.Yes
+ catch
+ Warnlog Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Kontext "FindAndReplace"
+ FindAndReplace.Close
+ Call wTypeKeys "<Mod1 Left>"
+ Call wTypeKeys "<Space>"
+ inc SpaceTickCount
+ if SpaceTickCount >= 30 then
+ fPrepareHyphenationDocument = false
+ exit do
+ end if
+ else
+ fPrepareHyphenationDocument = true
+ exit do
+ end if
+ Loop
+
+end function
diff --git a/testautomation/writer/tools/includes/w_tools_undo.inc b/testautomation/writer/tools/includes/w_tools_undo.inc
new file mode 100644
index 000000000000..4548fe455a1d
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tools_undo.inc
@@ -0,0 +1,867 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Tools for w_undo.bas
+'*
+'************************************************************************
+'*
+' #1 CheckUndoStringInUndoList
+'*
+'\***********************************************************************
+
+sub CheckUndoStringInUndoList(vType as integer, optional vShould as string)
+ '/// This function checks the string (localized) in Undo-List
+ Dim CurrentUndoString(1) as string, vTypeString as string
+ Dim UndoStringFromUndoList as string
+
+ Kontext "StandardBar"
+ Sleep 1
+ if Undo.IsEnabled = true then
+ Undo.OpenMenu
+ else
+ Warnlog "Unable to read from Undo-Box!"
+ exit sub
+ end if
+
+ Sleep 1
+ Kontext "UndoRedoBox"
+ UndoStringFromUndoList = UndoRedoList.GetItemText(1)
+ Select case vType
+ ' Typing
+ case 1:
+ CurrentUndoString() = Split(UndoStringFromUndoList, ":")
+ Select Case iSprache
+ Case 01: vTypeString = "Typing"
+ Case 49: vTypeString = "EinfÆgen"
+ Case 34: vTypeString = "Escritura"
+ Case 86: vTypeString = "键入"
+ Case else: QAErrorlog "Please adapt tests for current language! (" & CurrentUndoString(0) & ")"
+ end select
+ ' Overwrite
+ case 2:
+ CurrentUndoString() = Split(UndoStringFromUndoList, ":")
+ Select Case iSprache
+ Case 01: vTypeString = "Overwrite"
+ Case 34: vTypeString = "Sobrescribir"
+ Case 86: vTypeString = "覆盖"
+ Case else: QAErrorlog "Please adapt tests for current language! (" & CurrentUndoString(0) & ")"
+ end select
+ ' Replace
+ case 3:
+ CurrentUndoString() = Split(UndoStringFromUndoList, ":")
+ Select Case iSprache
+ Case 01: vTypeString = "Replace"
+ Case 34: vTypeString = "Reemplazar"
+ Case 86: vTypeString = "替换"
+ Case else: QAErrorlog "Please adapt tests for current language! (" & CurrentUndoString(0) & ")"
+ end select
+ ' Delete
+ case 4:
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete multiple selection" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar selección múltiple" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 多项选择" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt tests for current language! (" & CurrentUndoString(0) & ")"
+ end select
+ ' Replace all
+ case 5:
+ Select Case vShould
+ case "14 occurences of 'and'"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Replace: 14 occurrences of 'and'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Reemplazar: 6 ocurrencias de 'and'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入自动图文集" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+ end select
+ ' Sort text
+ case 6:
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Sort text" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Ordenar texto" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "排序文字" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+ ' Convert text -> table
+ case 7:
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Convert text -> table" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Convertir texto en tabla" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "文字转换成表格" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ 'Paragraph
+ case 8:
+ Select Case vShould
+ Case "New Paragraph"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "New Paragraph" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Párrafo nuevo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "新建段落" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "Delete Paragraph"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete paragraph" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar Párrafo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 段落" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+ end select
+
+ 'Copy / Paste
+ case 9:
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Paste clipboard" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Pegar del portapapeles" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "粘贴剪贴板" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ case 10:
+ Select Case vShould
+ Case "Accept"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Accept change: Insert 'This is a test'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Aplicar cambio: Insertar 'This is a test'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "接受修改:插入 'This is a test'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "Reject"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Reject change: Insert 'This is a test'" then
+ elseif UndoStringFromUndoList = "Reject change: $1" then
+ QaErrorlog "#i94489# - Bug with Undo - Reject."
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ Case 34: if UndoStringFromUndoList = "Rechazar cambio: $1" then
+ QaErrorlog "#i94489# - Bug with Undo - Reject."
+ else
+ Warnlog "Tell script-writer issue i94489 seems to be fixed, or that a string has to be set to: " & UndoStringFromUndoList
+ end if
+ Case 86: if UndoStringFromUndoList = "拒绝修改:$1" then
+ QaErrorlog "#i94489# - Bug with Undo - Reject."
+ else
+ Warnlog "Tell script-writer issue i94489 seems to be fixed, or that a string has to be set to: " & UndoStringFromUndoList
+ end if
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertLineBreak"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Typing: 1 line break(s)" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Escritura: 1 salto(s) de línea" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "键入: 1 换行符" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteLineBreak"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete 1 line break(s)" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar 1 salto(s) de línea" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 1 换行符" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertColumnBreak"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert column break" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar salto de columna" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入分栏符" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteColumnBreak"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete paragraph" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar Párrafo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 段落" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertPageBreak"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert page break" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar salto de página" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入分页符" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeletePageBreak"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete paragraph" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar Párrafo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 段落" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertField"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert field" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar campo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 字段" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ChangedField"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Field changed" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Cambio modificado" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "字段已经被修改" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteField"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete field" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar campo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 字段" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertSpecialCharacter"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert special character" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar carácter especial" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 特殊字符" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteSpecialCharacter"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete '#'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar '#'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 '#'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ApplyStyles"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Apply Styles: AUndoHistory" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Aplicar estilos: AUndoHistory" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "应用样式: AUndoHistory" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ChangeStyles"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Change style: AUndoHistory" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Cambiar estilo: AUndoHistory" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "修改样式:AUndoHistory" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DemoteOutline"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Promote/demote outline" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Aumentar/Disminuir nivel" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "升级/降级外框" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "PromoteOutline"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Promote/demote outline" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Aumentar/Disminuir nivel" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "升级/降级外框" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertSection"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert section" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar área" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入区域" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ModifySection"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Modify section" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Modificar área" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "修改区域" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteSection"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete section" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar área" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除区域" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertHyperlink"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert Hyperlink" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar hiperenlace" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入超链接" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertHyperlinkButton"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "insert URL button" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar botón URL" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 URL 按钮" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "HeaderFooter"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Header/footer changes" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertFootnote"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert footnote" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar nota al pie" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入脚注" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ModifyFootnote"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Modify footnote options" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Modificar opciones de nota al pie" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "修改脚注设置" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteFootnote"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete footnote" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar nota al pie" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 脚注" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertCaption"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert caption: 'This capt...aracters'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar título: 'This capt...aracters'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入标题: 'This capt...aracters'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertAutotext"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert AutoText" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar AutoTexto" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入自动图文集" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertBookmark"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert bookmark: I'm a bookmark" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar marcador: I'm a bookmark" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入书签: I'm a bookmark" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "RenameBookmark"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Rename bookmark: 'I'm a bookmark' -> 'a book'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList & " -> #i33498"
+ Case 34: if UndoStringFromUndoList <> "marcador renombrado: 'I'm a bookmark' -> 'a book'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList & " -> #i33498"
+ Case 86: if UndoStringFromUndoList <> "重命名书签: 'I'm a bookmark' -> 'a book'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList & " -> #i33498"
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteBookmark"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete bookmark: a book" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Borrar marcador: a book" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除书签: a book" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertComment"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert comment" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar nota" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 批注" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteComment"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete comment" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar nota" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 批注" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertScript"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert script" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar secuencia de comandos" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 脚本" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteScript"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete script" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar secuencia de comandos" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 脚本" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertIndexEntry"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert index entry" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar entrada de índice" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入索引条目" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteIndexEntry"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete 'IndexEntry'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar 'IndexEntry'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 'IndexEntry'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertBibliographyEntry"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert bibliography entry" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar entrada de bibliografía" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 文献目录条目" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteBibliographyEntry"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete bibliography entry" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar entrada de bibliografía" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 文献目录条目" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertFrame"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert frame" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar marco" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 框架" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "RenameFrame"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Rename frame: 'MyFrame' -> 'MyRenamedFrame'" then QaErrorLog "#i94486# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if InStr(UndoStringFromUndoList, "renombrado") then QaErrorLog "#i94486# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 框架" then QaErrorLog "#i94486# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteFrame"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete frame" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar marco" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除框对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertTable"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert table: 'Table1'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar tabla: 'Tabla1'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入表格: '表格1'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertRow"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert Row" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar fila" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入行" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertColumn"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert Column" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar columna" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入列" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteRow"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete row" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Borrar fila" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除行" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteColumn"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete column" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Borrar columna" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除列" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "FormatCell"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Format cell" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Formatear celda" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "格式化单元格" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ApplyTableAttributes"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Apply table attributes" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Aplicar atributos de la tabla" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "应用表格属性" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "MergeTable"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Merge table" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "unir tablas" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "合并表格" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ConvertTable"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Convert text -> table" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Convertir texto en tabla" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "文字转换成表格" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "SortTable"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Sort table" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Ordenar tabla" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "排序表格" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "SplitTable"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Split Table" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Dividir tabla" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "拆分表格" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteTable"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete table: 'AnotherTable'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList & " -> #i33497"
+ Case 34: if UndoStringFromUndoList <> "Eliminar tabla 'AnotherTable'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList & " -> #i33497"
+ Case 86: if UndoStringFromUndoList <> "删除 表格: 'AnotherTable'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList & " -> #i33497"
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertRuler"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert horizontal ruler" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar regla horizontal" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入水平标尺" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertGraphic"
+ Select Case iSprache
+ Case 01: if (UndoStringFromUndoList = "Insert graphics") OR (UndoStringFromUndoList = "Insert picture") then
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ Case 34: if (UndoStringFromUndoList = "Insertar gráficos") OR (UndoStringFromUndoList = "Insertar imagen") then
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ Case 86: if (UndoStringFromUndoList = "插入 图形") OR (UndoStringFromUndoList = "插入 图片") then
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteGraphic"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete graphics" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar imagen" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除图形" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ReplaceGraphic"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Replace graphics" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Reemplazar imagen" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "替换图形" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertObject"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert OLE-object" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar Objeto OLE" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 OLE 对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteObject"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete OLE-object" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar Objeto OLE" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 OLE 对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertFloatingFrame"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert OLE-object" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar Objeto OLE" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 OLE 对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteFloatingFrame"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete OLE-object" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar Objeto OLE" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 OLE 对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "InsertDocument"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert file" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar archivo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入文件" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "APGS"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Asian Phonetic Guides Setting" then QaErrorLog "#i94534# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Aplicar símbolos fonéticos" then QaErrorLog "#i94534# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "加上拼音或注音符号" then QaErrorLog "#i94534# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "AutoCorrect"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "AutoCorrect" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "AutoCorrección" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "自动更正" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "AutoFormat"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "AutoFormat" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Formateado automático" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "自动格式" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "FreeForm"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert Polyline with 3 corners" then
+ if UndoStringFromUndoList = "Insert Polyline with %2 corners" then
+ QaErrorlog "#i94530# - Bug with Undo-History for Polygon-Line-tool. " + UndoStringFromUndoList
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ end if
+ Case 34: if UndoStringFromUndoList <> "Insertar Polilínea con 3 puntos" then
+ if UndoStringFromUndoList = "Insertar Polilínea con %2 puntos" then
+ QaErrorlog "#i94530# - Bug with Undo-History for Polygon-Line-tool. " + UndoStringFromUndoList
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ end if
+ Case 86: if UndoStringFromUndoList <> "插入 有 3 个角的折线" then
+ if UndoStringFromUndoList = "插入 有 %2 个角的折线" then
+ QaErrorlog "#i94530# - Bug with Undo-History for Polygon-Line-tool. " + UndoStringFromUndoList
+ else
+ Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ end if
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DrawGroup"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Group draw objects" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Agrupar objetos de dibujo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "组合绘图对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DrawUnGroup"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Ungroup drawing objects" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Resolver objeto de grupo" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "取消组合绘图对象" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "RenameGroup"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Rename 2 Rectangles" then QaErrorLog "#i94486# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "" then QaErrorLog "#i94486# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "组合绘图对象" then QaErrorLog "#i94486# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "DeleteGroup"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete 2 Rectangles" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar 2 Rectángulos" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 2 矩形" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "Autocheck/Spellcheck"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Replace: 'Testp' -> 'Test'" then QaErrorLog "#i94489# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList = "Sobrescribir: $1" then
+ elseif InStr(UndoStringFromUndoList, "'Testp'") then
+ QaErrorLog "#i94489# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ end if
+ Case 86: if UndoStringFromUndoList = "覆盖: $1" then
+ QaErrorLog "#i94489# - Wrong text in Undo-List: " & UndoStringFromUndoList
+ elseif InStr(UndoStringFromUndoList, "'Testp'") then
+ QaErrorlog "#i94489# - Bug fixed: " & UndoStringFromUndoList
+ end if
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ControlInsert"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Insert Control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Insertar Campo de control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入 控制" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ControlMove"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Move Control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Desplazar Campo de control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "移动 控制" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ControlResize"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Resize Control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Modificar el tamaño de Campo de control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "更改大小 控制" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ControlReplace"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Replace Control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Reemplazar campo de control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "替换控制" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ControlChange"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Set property 'Name'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Establecer propiedad 'Name'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "设置属性 'Name'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "ControlDelete"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete Control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar Campo de control" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "删除 控制" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case "Header/Footer"
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Header/footer changed" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt test for this language: " & UndoStringFromUndoList
+ end select
+
+ Case else
+ Warnlog "Wrong string for this function!"
+
+ end select
+
+ case 11: 'Delete ' ###'
+ Select Case iSprache
+ Case 01: if UndoStringFromUndoList <> "Delete ' ###'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 34: if UndoStringFromUndoList <> "Eliminar 'g'" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case 86: if UndoStringFromUndoList <> "插入自动图文集" then Warnlog "Wrong text in Undo-List: " & UndoStringFromUndoList
+ Case else: QAErrorlog "Please adapt tests for current language! (" & CurrentUndoString(0) & ")"
+ end select
+
+ case else:
+ QAErrorlog "Wrong type!"
+
+ end select
+
+ if vTypeString > "" then
+ if Trim(CurrentUndoString(0)) <> vTypeString then
+ Warnlog "Wrong Type in Undo list. Not " & vTypeString & " but " & Trim(CurrentUndoString(0))
+ else
+ Printlog "- Type in Undo-List is ok"
+ end if
+ try
+ if Trim(CurrentUndoString(1)) <> vShould then
+ Warnlog "Wrong String in Undo list. Not " & vShould & " but " & Trim(CurrentUndoString(1))
+ else
+ Printlog "- String in Undo-List is ok"
+ end if
+ catch
+ warnlog "Something wrong with type: " & vTypeString
+ endcatch
+ end if
+ wait 500
+ Kontext "StandardBar"
+ Undo.Click
+ Call wTypeKeys "<ESCAPE>"
+end sub
diff --git a/testautomation/writer/tools/w_get_locale_strings.bas b/testautomation/writer/tools/w_get_locale_strings.bas
new file mode 100755
index 000000000000..f0dbe5c4ae25
--- /dev/null
+++ b/testautomation/writer/tools/w_get_locale_strings.bas
@@ -0,0 +1,50 @@
+'encoding UTF-8 Do not remove or change this line!
+'**************************************************************************
+' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'
+' Copyright 2000, 2010 Oracle and/or its affiliates.
+'
+' OpenOffice.org - a multi-platform office productivity suite
+'
+' This file is part of OpenOffice.org.
+'
+' OpenOffice.org is free software: you can redistribute it and/or modify
+' it under the terms of the GNU Lesser General Public License version 3
+' only, as published by the Free Software Foundation.
+'
+' OpenOffice.org is distributed in the hope that it will be useful,
+' but WITHOUT ANY WARRANTY; without even the implied warranty of
+' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+' GNU Lesser General Public License version 3 for more details
+' (a copy is included in the LICENSE file that accompanied this code).
+'
+' You should have received a copy of the GNU Lesser General Public License
+' version 3 along with OpenOffice.org. If not, see
+' <http://www.openoffice.org/license.html>
+' for a copy of the LGPLv3 License.
+'
+'/************************************************************************
+'*
+'* owner : helge.delfs@sun.com
+'*
+'* short description : Get Locale Strings for Writer Level1-Test
+'*
+'\***********************************************************************
+
+
+sub main
+ use "writer\tools\includes\w_tools.inc"
+ use "writer\tools\includes\w_get_locale_strings.inc"
+
+ Call w_get_locale_strings
+
+end sub
+
+
+
+sub LoadIncludeFiles
+ use "global\system\includes\master.inc"
+ use "global\system\includes\gvariabl.inc"
+ Call GetUseFiles
+ gApplication = "WRITER"
+end sub