diff options
Diffstat (limited to 'testautomation')
30 files changed, 641 insertions, 471 deletions
diff --git a/testautomation/global/required/includes/g_option.inc b/testautomation/global/required/includes/g_option.inc index 3ff884d6be57..4ea25785b68c 100644..100755 --- a/testautomation/global/required/includes/g_option.inc +++ b/testautomation/global/required/includes/g_option.inc @@ -502,21 +502,21 @@ testcase tToolsOptionsLanguageSettings Optionen.TypeKeys "<Down>", 6 WaitSlot() ' similar effect as a NOOP OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel Kontext "TabLinguistik" Optionen.TypeKeys "<Down>" OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel Kontext "TabLinguistik" Optionen.TypeKeys "<Down>" OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel endif case 3,5 : try diff --git a/testautomation/global/sid/all.sid b/testautomation/global/sid/all.sid index 8639bfa0f0b6..5ee1c157235f 100755..100644 --- a/testautomation/global/sid/all.sid +++ b/testautomation/global/sid/all.sid @@ -479,14 +479,12 @@ FormatAusrichtung SID_ALIGN ' **** ' **** Alle ExtrasRechtschreibungAutomatisch SID_AUTOSPELL_CHECK -ExtrasSilbentrennung FN_HYPHENATE_OPT_DLG ExtrasAutoKorrektur SID_AUTO_CORRECT_DLG ExtrasMakro SID_BASICCHOOSER ExtrasAnpassen SID_CONFIG ExtrasOptionen SID_OPTIONS_TREEDIALOG ' **** Writer -ExtrasThesaurusWriter FN_THESAURUS_DLG ExtrasKapitelnumerierung FN_NUMBERING_OUTLINE_DLG ExtrasZeilennumerierung FN_LINE_NUMBERING_DLG ExtrasSeitennummer FN_CHANGE_PAGENUM @@ -505,7 +503,6 @@ ExtrasAktualisierenSeitenformatierung FN_REPAGINATE ExtrasSeitenformatierung FN_REPAGINATE ' **** Calc -ExtrasThesaurusCalc SID_THESAURUS ExtrasDetektivAlleSpurenEntfernen SID_DETECTIVE_DEL_ALL ExtrasDetektivFuellModus SID_DETECTIVE_FILLMODE ExtrasDetektivSpurZumFehler SID_DETECTIVE_ADD_ERR @@ -525,7 +522,6 @@ ExtrasAutoEingabe FID_AUTOCOMPLETE ' **** Draw / Impress ExtrasThesaurusDraw SID_THESAURUS -ExtrasSilbentrennungDraw SID_HYPHENATION ExtrasPipette SID_BMPMASK ExtrasDiawechsel .uno:SlideChangeWindow ExtrasAnimation SID_ANIMATION_OBJECTS diff --git a/testautomation/global/sid/e_all.sid b/testautomation/global/sid/e_all.sid index 2fde9b77b5a4..b9fa2d9c81e8 100644 --- a/testautomation/global/sid/e_all.sid +++ b/testautomation/global/sid/e_all.sid @@ -414,6 +414,9 @@ FormatStylesLoad SID_TEMPLATE_LOAD FormatStylist SID_STYLE_DESIGNER FormatControl SID_FM_CTL_PROPERTIES FormatForm SID_FM_PROPERTIES +FormatChangeCaseToSentence .uno:ChangeCaseToSentenceCase +FormatChangeCaseCapitalizeEveryWord .uno:ChangeCaseToTitleCase +FormatChangeCaseToggleCase .uno:ChangeCaseToToggleCase FormatChangeCaseUpper .uno:ChangeCaseToUpper FormatChangeCaseLower .uno:ChangeCaseToLower FormatChangeCaseHalfWidth .uno:ChangeCaseToHalfWidth @@ -734,13 +737,13 @@ ToolsUpdateAllIndexes FN_UPDATE_TOX ToolsBibliographyDatabase SID_COMP_BIBLIOGRAPHY ToolsWordCount FN_WORDCOUNT_DIALOG TableTableProperties .uno:TableDialog +ToolsLanguageHyphenation FN_HYPHENATE_OPT_DLG ' **** WriterWeb ToolsPageFormatting FN_REPAGINATE ' **** Calc ToolsSpellcheckAutoCheckCalc SID_AUTOSPELL_CHECK -ToolsLanguageThesaurusCalc .uno:Thesaurus ToolsLanguageHyphenateCalc .uno:Hyphenate ToolsDetectiveRemoveAllTraces SID_DETECTIVE_DEL_ALL ToolsDetectiveFillMode SID_DETECTIVE_FILLMODE @@ -766,6 +769,7 @@ ToolsGallery .uno:Gallery ToolsEyedropper SID_BMPMASK ToolsMediaPlayer .uno:AVMediaPlayer ToolsChineseTranslation .uno:ChineseConversion +ToolsLanguageHyphenationDraw SID_HYPHENATION ' **** Math ToolsSymbolsCatalog SID_SYMBOLS_CATALOGUE diff --git a/testautomation/global/win/dial_p_s.win b/testautomation/global/win/dial_p_s.win index 6f76fe17b2bd..accef3714a3b 100755 --- a/testautomation/global/win/dial_p_s.win +++ b/testautomation/global/win/dial_p_s.win @@ -231,16 +231,6 @@ FormatRTF sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_RTF FormatStarWriter sw:CheckBox:DLG_MAILMERGE:CB_FORMAT_SW Datenbankfeldliste sw:ListBox:DLG_MAILMERGE:LB_COLUMN -*Silbentrennung HID_HYPHENATE svx:ModalDialog:RID_SVXDLG_HYPHENATE -Wort cui:Edit:RID_SVXDLG_HYPHENATE:ED_WORD -Vor cui:ImageButton:RID_SVXDLG_HYPHENATE:BTN_LEFT -Zurueck cui:ImageButton:RID_SVXDLG_HYPHENATE:BTN_RIGHT -Weiter cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_CONTINUE -Entfernen cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_DELETE - -*SilbentrennungOptionen HID_LNGDLG_NUM_PREBREAK -ZeichenVorUmbruch cui:NumericField:RID_SVXDLG_LNG_ED_NUM_PREBREAK:ED_PREBREAK - *Sonderzeichen SID_CHARMAP Schrift cui:ListBox:RID_SVXDLG_CHARMAP:LB_FONT SchriftListe HID_CHARMAP_CTL_SHOWSET @@ -341,9 +331,6 @@ Zusaetze sc:MoreButton:RID_SCDLG_SPEC_FILTER:BTN_MORE FilterkriterienMin sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_CRITERIA_AREA FilterergebnisMin sc:ImageButton:RID_SCDLG_SPEC_FILTER:RB_COPY_AREA -*SpracheAuswaehlen HID_THES_LANGUAGE -Auswahl cui:ListBox:RID_SVXDLG_THES_LANGUAGE:LB_THES_LANGUAGE - *StandardFilter SID_FILTER FeldName1 sc:ListBox:RID_SCDLG_FILTER:LB_FIELD1 Feldname2 sc:ListBox:RID_SCDLG_FILTER:LB_FIELD2 diff --git a/testautomation/global/win/dial_t_z.win b/testautomation/global/win/dial_t_z.win index 899254eb6519..1f317fd412da 100755 --- a/testautomation/global/win/dial_t_z.win +++ b/testautomation/global/win/dial_t_z.win @@ -125,14 +125,6 @@ Umrandung sw:CheckBox:DLG_CONV_TEXT_TABLE:CB_BORDER Textmarken sw:ComboBox:DLG_INSERT_BOOKMARK:CB_BOOKMARK Loeschen sw:PushButton:DLG_INSERT_BOOKMARK:BT_DELETE -*Thesaurus SID_THESAURUS -Wort cui:ListBox:RID_SVXDLG_THESAURUS:LB_WORD -Ersetzen cui:Edit:RID_SVXDLG_THESAURUS:ED_REPL -Bedeutung cui:ListBox:RID_SVXDLG_THESAURUS:LB_MEAN -Synonym cui:ListBox:RID_SVXDLG_THESAURUS:LB_SYNON -Nachschlagen cui:PushButton:RID_SVXDLG_THESAURUS:BTN_LOOKUP -Sprache cui:PushButton:RID_SVXDLG_THESAURUS:BTN_LANGUAGE - *Ueberblenden SID_POLYGON_MORPHING Attributierung sd:CheckBox:DLG_MORPH:CBX_ATTRIBUTES GleicheOrientierung sd:CheckBox:DLG_MORPH:CBX_ORIENTATION diff --git a/testautomation/global/win/edia_d_h.win b/testautomation/global/win/edia_d_h.win index 0e2fd251d285..2829054eba2d 100755 --- a/testautomation/global/win/edia_d_h.win +++ b/testautomation/global/win/edia_d_h.win @@ -481,8 +481,20 @@ Suggestion4 cui:Edit:RID_SVX_MDLG_HANGULHANJA_EDIT:ED_4 NewEntry cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_NEW DeleteEntry cui:PushButton:RID_SVX_MDLG_HANGULHANJA_EDIT:PB_HHE_DELETE +*Hyphenation HID_HYPHENATE svx:ModalDialog:RID_SVXDLG_HYPHENATE +Wort cui:Edit:RID_SVXDLG_HYPHENATE:ED_WORD +Vor cui:ImageButton:RID_SVXDLG_HYPHENATE:BTN_LEFT +Zurueck cui:ImageButton:RID_SVXDLG_HYPHENATE:BTN_RIGHT +Weiter cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_CONTINUE +Entfernen cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_DELETE +HyphenateAll cui:PushButton:RID_SVXDLG_HYPHENATE:BTN_HYPH_ALL + +*HyphenationOptions HID_LNGDLG_NUM_PREBREAK +ZeichenVorUmbruch cui:NumericField:RID_SVXDLG_LNG_ED_NUM_PREBREAK:ED_PREBREAK + *HTMLImportOptions sc:ModalDialog:RID_SCDLG_TEXT_IMPORT_OPTIONS Automatic sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_AUTOMATIC Custom sc:RadioButton:RID_SCDLG_TEXT_IMPORT_OPTIONS:RB_CUSTOM CustomLanguage sc:ListBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:LB_CUSTOM_LANG DetectSpecialNumbers sc:CheckBox:RID_SCDLG_TEXT_IMPORT_OPTIONS:BTN_CONVERT_DATE + diff --git a/testautomation/global/win/edia_t_z.win b/testautomation/global/win/edia_t_z.win index 7db84bc17be9..670a872ac657 100755 --- a/testautomation/global/win/edia_t_z.win +++ b/testautomation/global/win/edia_t_z.win @@ -128,6 +128,13 @@ RecentFile HID_XML_FILTER_TEST_IMPORT_RECENT FixedRecentFile HID_XML_FILTER_TEST_IMPORT_RECENT_FILE CloseBtn HID_XML_FILTER_TEST_CLOSE +*Thesaurus SID_THESAURUS +CurrentWord cui:ComboBox:RID_SVXDLG_THESAURUS:CB_WORD +RecallCurrentWord cui:ImageButton:RID_SVXDLG_THESAURUS:BTN_LEFT +Alternatives HID_CT_THES_ALTERNATIVES +ReplaceWith cui:Edit:RID_SVXDLG_THESAURUS:ED_REPL +Language cui:MenuButton:RID_SVXDLG_THESAURUS:MB_LANGUAGE + *TextImport SC:MODALDIALOG:RID_SCDLG_ASCII CharacterSet SC:LISTBOX:RID_SCDLG_ASCII:LB_CHARSET Language sc:ListBox:RID_SCDLG_ASCII:LB_CUSTOMLANG diff --git a/testautomation/graphics/optional/g_tools.bas b/testautomation/graphics/optional/g_tools.bas index bb890f970722..272840602ac4 100755..100644 --- a/testautomation/graphics/optional/g_tools.bas +++ b/testautomation/graphics/optional/g_tools.bas @@ -43,6 +43,8 @@ sub main PrintLog "-------------------------" + gApplication + "-------------------" Call tiToolsThesaurus + Call tiToolsThesaurusWithoutText + Call tiToolsThesaurusContextMenu Call tiToolsHyphenation1 Call tiToolsHyphenation2 Call tToolsMacro @@ -50,6 +52,8 @@ sub main gApplication = "DRAW" PrintLog "-------------------------" + gApplication + "-------------------" Call tiToolsThesaurus + Call tiToolsThesaurusWithoutText + Call tiToolsThesaurusContextMenu Call tiToolsHyphenation1 Call tiToolsHyphenation2 Call tToolsMacro diff --git a/testautomation/graphics/optional/includes/global/g_tools.inc b/testautomation/graphics/optional/includes/global/g_tools.inc index b5cdd71e0416..2d802af5b40c 100644 --- a/testautomation/graphics/optional/includes/global/g_tools.inc +++ b/testautomation/graphics/optional/includes/global/g_tools.inc @@ -40,49 +40,55 @@ '------------------------------------------------------------------------------- testcase tiToolsThesaurus - Dim DasWort$ - Dim ZaehlerBedeutung - -'/// for normal text, the thesaurus is enabled, if the format->character->language of the word has a thesaurus///' -'///+ unfortunately in textboxes this doesn't work, you can give the word a langauge, but this is been ignored by///' -'///+ our thesaurus :-(((///' -'/// so especially for asian languages you have to set a default language in the options, to be able to use///' -'///+ the thesaurus there - fallback to englisch, because there is no ? thesaurus for cjk languages ??///' - - '/// First we make sure we test a language where Thesa - ' As long as OOo has no modules for that, disabled - if gOOO = True then - printlog "No spellchecking in OOo" - goto endsub - endif + Dim sWord as string + Dim sChangedWord as string + Dim sReplaceWord as string + Dim sAlternativeText as string + Dim sExt as string + Dim ZaehlerBedeutung + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages + + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" + goto endsub + endif + + 'First we make sure we test a language where Thesaurus select case iSprache - case 01 : DasWort$ = "Hello" - case 03 : DasWort$ = "Alo" + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" case 07 : printlog "- No Thesaur for Russian available" goto endsub case 30 : Printlog "- No Thesaurus available !" goto endsub - case 31 : DasWort$ = "Guiten" - case 33 : DasWort$ = "Bonjour" - case 34 : DasWort$ = "Hola" + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" case 35 : Printlog "- No Thesaurus available !" goto endsub case 36 : Printlog "- No Thesaurus available !" goto endsub case 37 : Printlog "- No Thesaurus available !" goto endsub - case 39 : DasWort$ = "Ciao" + case 39 : sWord = "Ciao" case 42 : Printlog "- No Thesaurus available !" goto endsub - case 45 : DasWort$ = "Hej" - case 46 : DasWort$ = "Välkommen" + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" case 47 : Printlog "- No Thesaurus available !" goto endsub case 48 : Printlog "- No Thesaurus in Polish!" goto endsub - case 49 : DasWort$ = "Hallo" - case 50 : DasWort$ = "Prosojnica" + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" case 51 : Printlog "- No Thesaurus available !" goto endsub case 55 : Printlog "- No Thesaurus in Brazilian!" @@ -92,83 +98,237 @@ testcase tiToolsThesaurus case else : if bAsianLan then hSetSpellHypLanguage - DasWort$ = "Hello" + sWord = "Hello" else Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" - DasWort$ = "Hello" + sWord = "Hello" endif end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + Call sMakeReadOnlyDocumentEditable() + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + + printlog "select the word" + hTypeKeys "<Home><SHIFT END>" + + try + ExtrasThesaurusDraw + catch + warnlog "No Thesaurus available." + hCloseDocument() + goto endsub + endcatch + + Kontext "Thesaurus" + if Thesaurus.Exists(3) then + + if CurrentWord.GetSelText <> sWord Then + WarnLog "marked word should be:" + sWord + " but it is:" + CurrentWord.GetSelText + else + PrintLog "Marked word is correctly changed" + endif + + if Alternatives.GetItemCount = 0 Then + warnlog "There are no alternative for this word" + sleep 1 + else + printlog "select the first alternative" + Alternatives.Select 1 + + printlog "check if the selected alternative apprear in the ReplaceWith field." + + sAlternativeText = Alternatives.getSeltext(1,3) + 'remove the part in the () if there is any + if( Instr(sAlternativeText, "(") <> 0 ) then + sAlternativeText = left(sAlternativeText, Instr(sAlternativeText, "(") - 2 ) + endif + + if ( ReplaceWith.getText() <> sAlternativeText ) then + warnlog "the text is no transfered to the ReplaceWith field. " +_ + "ReplaceWith = " + ReplaceWith.getText() + ", Alternative = " + sAlternativeText + else + printlog "the text is transfered to the ReplaceWith field." + endif + + sReplaceWord = ReplaceWith.getText() + sleep 1 + endif + Thesaurus.OK - printlog " Thesaurus without any word in the document" - Call hNewDocument '/// New document ///' - try - ExtrasThesaurusDraw '/// try thesaurus in empty document ///' - Kontext "Thesaurus" - Thesaurus.Cancel - WarnLog " If no word is in the document, Thesaurus shouldn't be available" - catch - PrintLog " No Thesaurus available" - endcatch - - PrintLog " Thesaurus with 1 word: " + DasWort$ - - Call hTextrahmenErstellen (DasWort$,20,20,50,30) - sleep 1 - - hTypeKeys "<Home><SHIFT END>" - '------------------------ -ToolsOptions -Kontext "ExtrasOptionenDlg" -hToolsOptions("LANGUAGESETTINGS","Languages") -Westlich.Select 34 -Kontext "ExtrasOptionenDlg" -ExtrasOptionenDlg.OK -sleep 1 - '------------------------ - try - ExtrasThesaurusDraw '/// Thesaurus with only 1 word ///' - Kontext "Thesaurus" - if Thesaurus.Exists(3) then - if Wort.GetSelText <> DasWort$ Then WarnLog "marked word should be:" + DasWort$ + " but it is:" + Wort.GetSelText - if Wort.GetSelText = DasWort$ Then PrintLog " Marked word is correctly changed" '/// Control if word has changed ///' - ZaehlerBedeutung=Bedeutung.GetItemCount - if Bedeutung.GetItemCount = 0 Then - PrintLog " There are no suggestions for this word" - sleep 1 + if(Ucase(gApplication) = "DRAW") then + Kontext "Draw" + elseif(Ucase(gApplication) = "IMPRESS") then + Kontext "Impress" + else ' fallback + warnlog "gApplication is wrong" + goto endsub + endif + + hTypeKeys "<Home><SHIFT END>" + EditCopy + sChangedWord = getClipboard() + printlog "sChangedWord = " + sChangedWord + if(sChangedWord <> sReplaceWord) then + warnlog "the text was not replaced" else - if ZaehlerBedeutung=1 Then - Bedeutung.Select ZaehlerBedeutung - else - Bedeutung.Select (ZaehlerBedeutung - 1) - end if - sleep 1 - Synonym.Select 1 '/// Select synonym 1///' - sleep 1 - if Ersetzen.GetText=Synonym.GetSelText Then PrintLog " Meaning transfered into Replace edit field" - if Ersetzen.GetText<>Synonym.GetSelText Then WarnLog " Replacement should have been: '" + Bedeutung.GetSelText + "' but it is '" + Ersetzen.GetText+"'" - endif - Thesaurus.Cancel - else - warnlog " thesaurus didn't come up, that's bad :-(" - end if - catch - warnLog " No Thesaurus available ??! check if options western has smth selected !! !TL!" - endcatch - Call hCloseDocument '/// Close document ///' - -endcase 'tiToolsThesaurus + printlog "the text was successfull replaced" + endif + else + warnlog "thesaurus didn't come up." + end if + + Call hCloseDocument + +endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurusWithoutText + + printlog "Thesaurus without any word in the document" + Call hNewDocument + try + ExtrasThesaurusDraw + catch + printlog "the Thesaurus is correctly not available" + call hCloseDocument + goto endsub + endcatch + + WarnLog "If no word is in the document, Thesaurus shouldn't be available" + Kontext "Thesaurus" + if Thesaurus.Exists then + Thesaurus.Cancel + endif + + Call hCloseDocument + + +endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurusContextMenu + + Dim sWord as string + Dim sExt as string + Dim iItemCount as Integer + + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages + + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" + goto endsub + endif + + 'First we make sure we test a language where Thesaurus + select case iSprache + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" + case 07 : printlog "- No Thesaur for Russian available" + goto endsub + case 30 : Printlog "- No Thesaurus available !" + goto endsub + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" + case 35 : Printlog "- No Thesaurus available !" + goto endsub + case 36 : Printlog "- No Thesaurus available !" + goto endsub + case 37 : Printlog "- No Thesaurus available !" + goto endsub + case 39 : sWord = "Ciao" + case 42 : Printlog "- No Thesaurus available !" + goto endsub + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" + case 47 : Printlog "- No Thesaurus available !" + goto endsub + case 48 : Printlog "- No Thesaurus in Polish!" + goto endsub + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" + case 51 : Printlog "- No Thesaurus available !" + goto endsub + case 55 : Printlog "- No Thesaurus in Brazilian!" + goto endsub + case 90 : Printlog "- No Thesaurus available !" + goto endsub + + case else : if bAsianLan then + hSetSpellHypLanguage + sWord = "Hello" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + sWord = "Hello" + endif + end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + Kontext "DrawDocument" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + Kontext "ImpressDocument" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + + printlog "select the word" + hTypeKeys "<Home><SHIFT END>" + + hOpenContextMenu + + hMenuSelectNr(14) ' the synonyms + iItemCount = hMenuItemGetCount + printlog iItemCount + if(iItemCount <= 2 ) then ' none and Thesaurus item + warnlog "There should be a synonymus display for the word '" + sWord + "' but it isn't." + endif + + hMenuSelectNr(iItemCount) ' the last item + + Kontext "Thesaurus" + if Thesaurus.Exists(5) then + printlog "Thesaurus dialog appear from the context menu" + Thesaurus.Cancel + else + warnlog "the thesaurus dialog does not appear fro mthe context menu of a selected word" + endif + + call hCloseDocument +endcase '------------------------------------------------------------------------------- testcase tiToolsHyphenation1 printlog " - Hyphenation without any text" Call hNewDocument '/// New impress document ///' sleep 3 - ExtrasSilbentrennungDraw '/// Try Silbentrennung with empty document ///' - Kontext "Silbentrennung" - if Silbentrennung.Exists(1) = True Then + ToolsLanguageHyphenationDraw '/// Try with empty document ///' + Kontext "Hyphenation" + if Hyphenation.Exists(1) = True Then Warnlog " - Dialog ist da" - Silbentrennung.Cancel + Hyphenation.Cancel else Printlog " - Hyphenation activated" end if @@ -200,11 +360,11 @@ testcase tiToolsHyphenation1 endif end select hTypeKeys "<Home>" - ExtrasSilbentrennungDraw '/// Try Silbentrennung ///' - Kontext "Silbentrennung" - if Silbentrennung.Exists =True Then + ToolsLanguageHyphenationDraw '/// Try ///' + Kontext "Hyphenation" + if Hyphenation.Exists =True Then Warnlog "Dialog exists" - Silbentrennung.Cancel + Hyphenation.Cancel else Kontext "Active" if Active.Exists then Active.OK @@ -219,7 +379,8 @@ testcase tiToolsHyphenation2 dim iWaitIndex as integer dim sExt as string - Dim i : Dim DasWort : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 + Dim i : Dim DasWort2 : Dim DasWort3 : Dim DasWort4 : Dim DasWort5 : Dim DasWort6 : Dim DasWort7 + Dim DasWort as string dim sDraw as string dim sFile as string PrintLog "- Tools/Hyphenation2" @@ -275,7 +436,7 @@ testcase tiToolsHyphenation2 EditCopy sDraw = GetClipboardText() EditSelectAll '/// Select whole text ///' - ExtrasSilbentrennungDraw '/// Run Hyphenation ///' + ToolsLanguageHyphenationDraw '/// Run Hyphenation ///' gMouseClick 50,50 hTypeKeys "<MOD1 END><HOME><MOD1 SHIFT RIGHT>" '/// Select part of text and compare it with original text at this place ///' sleep 3 diff --git a/testautomation/graphics/optional/includes/global/id_006.inc b/testautomation/graphics/optional/includes/global/id_006.inc index a32bbd962ad5..d959d1cf828f 100644 --- a/testautomation/graphics/optional/includes/global/id_006.inc +++ b/testautomation/graphics/optional/includes/global/id_006.inc @@ -146,9 +146,9 @@ endcase testcase tiToolsHyphenation Call hNewDocument - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw WaitSlot (2000) 'sleep 2 - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw Call hCloseDocument endcase diff --git a/testautomation/graphics/required/d_updt.bas b/testautomation/graphics/required/d_updt.bas index 9d56a2c87fed..d191f2adea1c 100755..100644 --- a/testautomation/graphics/required/d_updt.bas +++ b/testautomation/graphics/required/d_updt.bas @@ -63,7 +63,7 @@ sub main call id_004 Call D_005_ call id_005 - call id_006 + call id_Tools call d_007 call id_007 call id_008 diff --git a/testautomation/graphics/required/i_updt_1.bas b/testautomation/graphics/required/i_updt_1.bas index 1d9b28f2aea9..141b261e3ee9 100755..100644 --- a/testautomation/graphics/required/i_updt_1.bas +++ b/testautomation/graphics/required/i_updt_1.bas @@ -58,7 +58,7 @@ sub main Call im_004_ call id_004 call id_005 - call id_006 + call id_Tools Call hStatusOut end sub diff --git a/testautomation/graphics/required/includes/global/id_006.inc b/testautomation/graphics/required/includes/global/id_006.inc index 0a8359c1efef..8e16f5ef5593 100644 --- a/testautomation/graphics/required/includes/global/id_006.inc +++ b/testautomation/graphics/required/includes/global/id_006.inc @@ -42,7 +42,21 @@ ' #1 tiToolsOptions '\********************************************************************************** - +'------------------------------------------------------------------------------ +sub id_Tools + printLog "--------- id_006 ----------" + call tiToolsSpellchecking + call tiToolsSpellcheckingAutomatic + call tiToolsThesaurus + call tiToolsHyphenation + call tiToolsAutoCorrect + call tChineseTranslation + call tiToolsMacro + call tiToolsGallery + call tiToolsEyedropper + call tToolsOptionsTest ' global one +end sub +'------------------------------------------------------------------------------- testcase tiToolsSpellchecking if not gOOO then ' Spellcheck doesn't work in OOo builds. @@ -86,9 +100,7 @@ testcase tiToolsSpellchecking else goto endsub endif endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsSpellcheckingAutomatic '/// open application ///' Call hNewDocument @@ -102,84 +114,116 @@ testcase tiToolsSpellcheckingAutomatic '/// close application ///' Call hCloseDocument endcase +'------------------------------------------------------------------------------- +testcase tiToolsThesaurus -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + Dim sWord as string + Dim sExt as string -testcase tiToolsThesaurus - qaerrorlog "#i93133#: Thesaurus not active in loaded bugdoc" - goto endsub - if not gOOO then ' Thesaurus doesn't work in OOo builds. + 'for normal text, the thesaurus is enabled, + 'if the format->character->language of the word has a thesaurus + 'unfortunately in textboxes this doesn't work, you can give the word a langauge, + 'but this is been ignored by our thesaurus + 'so especially for asian languages you have to set a default language in the options, + 'to be able to use the thesaurus there - fallback to englisch, + 'because there is no thesaurus for cjk languages - dim sFileName as String - - '/// call subroutine 'hSetSpellHypLanguage' for setting the default language in the options, to enable it for languages, which don't provide a dictionary (usually asian ones) ///' - call hSetSpellHypLanguage - '/// open application-specific document which contains an American-formatted textframe with text. And select the text ///' - if (gApplication = "IMPRESS") then - sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odp")) - else - sFileName = (ConvertPath (gTesttoolPath + "graphics\required\input\engtext.odg")) - end if - if hFileExists ( sFileName ) = FALSE then - warnlog "The language-file was not found or accessible! The test ends." + 'As long as OOo has no modules for that, disabled + if gOOO = True then + printlog "No spellchecking in OOo" goto endsub - end if - Call hFileOpen (sFileName) - - sleep (2) - - hTypeKeys "<TAB><RETURN>" - hTypeKeys "<END><SHIFT HOME>" - - ' Call hTextrahmenErstellen ("SimpleTest" + "<Mod1 Shift left>", 10, 10, 30, 40) - try - '/// Tools->Thesaurus ///' - ExtrasThesaurusDraw - Kontext "Thesaurus" - Call DialogTest ( Thesaurus ) - '/// click button 'language' ///' - Sprache.Click - Kontext "SpracheAuswaehlen" - Call DialogTest ( SpracheAuswaehlen ) - '/// cancel dialog 'select language' ///' - SpracheAuswaehlen.cancel - Kontext "Thesaurus" - '/// click button 'search' ///' - Nachschlagen.Click - kontext - '/// if messagebox exist, say OK; (word not found) ///' - if Messagebox.exists (5) then - printlog "Messagebox: word not in thesaurus: '"+Messagebox.gettext+"'" - Messagebox.ok - end if - sleep 1 - Kontext "Thesaurus" - '/// cancel dialog 'Thesaurus' ///' - Thesaurus.Cancel - catch - warnlog "Thesaurus didn't work :-(" - endcatch - sleep 1 - '/// close application ///' - Call hCloseDocument - else goto endsub endif -endcase -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + 'First we make sure we test a language where Thesaurus + select case iSprache + case 01 : sWord = "Hello" + case 03 : sWord = "Alo" + case 07 : printlog "- No Thesaur for Russian available" + goto endsub + case 30 : Printlog "- No Thesaurus available !" + goto endsub + case 31 : sWord = "Guiten" + case 33 : sWord = "Bonjour" + case 34 : sWord = "Hola" + case 35 : Printlog "- No Thesaurus available !" + goto endsub + case 36 : Printlog "- No Thesaurus available !" + goto endsub + case 37 : Printlog "- No Thesaurus available !" + goto endsub + case 39 : sWord = "Ciao" + case 42 : Printlog "- No Thesaurus available !" + goto endsub + case 45 : sWord = "Hej" + case 46 : sWord = "Välkommen" + case 47 : Printlog "- No Thesaurus available !" + goto endsub + case 48 : Printlog "- No Thesaurus in Polish!" + goto endsub + case 49 : sWord = "Hallo" + case 50 : sWord = "Prosojnica" + case 51 : Printlog "- No Thesaurus available !" + goto endsub + case 55 : Printlog "- No Thesaurus in Brazilian!" + goto endsub + case 90 : Printlog "- No Thesaurus available !" + goto endsub + + case else : if bAsianLan then + hSetSpellHypLanguage + sWord = "Hello" + else + Warnlog "For the language " + iSprache +" nothing is prepared yet: insert text here" + sWord = "Hello" + endif + end select + + PrintLog "Thesaurus with 1 word: " + sWord + + if( Ucase(gApplication) = "DRAW" ) then + sExt = ".odg" + elseif( Ucase(gApplication) = "IMPRESS" ) then + sExt = ".odp" + endif + + Call hFileOpen (gTesttoolpath + "graphics\required\input\recht_" + iSprache + sExt) + Call sMakeReadOnlyDocumentEditable() + Call hTextrahmenErstellen (sWord,20,20,50,30) + sleep 1 + printlog "select the word" + hTypeKeys "<Home><SHIFT END>" + + try + ExtrasThesaurusDraw + catch + warnlog "No Thesaurus available." + hCloseDocument() + goto endsub + endcatch + + Kontext "Thesaurus" + if Thesaurus.Exists(3) then + Thesaurus.Cancel + else + warnlog "the thesaurus does not appear" + endif + Call hCloseDocument + +endcase +'------------------------------------------------------------------------------- testcase tiToolsHyphenation '/// open application ///' Call hNewDocument '/// Tools->Hyphenation ///' - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw WaitSlot (2000) 'sleep 2 '/// Tools->Hyphenation ///' - ExtrasSilbentrennungDraw + ToolsLanguageHyphenationDraw '/// close application ///' Call hCloseDocument endcase - +'------------------------------------------------------------------------------- testcase tiToolsAutoCorrect dim iLanguage as integer ' for resetting the language '/// open application ///' @@ -291,9 +335,7 @@ testcase tiToolsAutoCorrect '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tChineseTranslation qaerrorlog( "#i89634# - Chinese Translation dialog does not close" ) @@ -365,9 +407,7 @@ testcase tChineseTranslation '/// Close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsMacro '/// open application ///' Call hNewDocument @@ -419,9 +459,7 @@ testcase tiToolsMacro '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsGallery '/// open application ///' Call hNewDocument @@ -433,9 +471,7 @@ testcase tiToolsGallery '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - +'------------------------------------------------------------------------------- testcase tiToolsEyedropper '/// open application ///' Call hNewDocument @@ -449,20 +485,4 @@ testcase tiToolsEyedropper '/// close application ///' Call hCloseDocument endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - -testcase tiToolsOptions - '/// open application ///' - Call hNewDocument - '/// Tools->Options ///' - ToolsOptions - WaitSlot (2000) 'sleep 1 - kontext "OptionenDlg" - '/// close dialog 'Options' ///' - OptionenDlg.Close - '/// close application ///' - Call hCloseDocument -endcase - -'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +'-------------------------------------------------------------------------------
\ No newline at end of file diff --git a/testautomation/graphics/required/input/recht_3.odp b/testautomation/graphics/required/input/recht_3.odp Binary files differindex 77001190ba1a..768fbad4b780 100755..100644 --- a/testautomation/graphics/required/input/recht_3.odp +++ b/testautomation/graphics/required/input/recht_3.odp diff --git a/testautomation/graphics/required/input/recht_31.odp b/testautomation/graphics/required/input/recht_31.odp Binary files differindex a8fd2717ba3f..23f5c77c141d 100755..100644 --- a/testautomation/graphics/required/input/recht_31.odp +++ b/testautomation/graphics/required/input/recht_31.odp diff --git a/testautomation/graphics/required/input/recht_33.odp b/testautomation/graphics/required/input/recht_33.odp Binary files differindex e98bb9a22dc7..c6acada2537e 100755..100644 --- a/testautomation/graphics/required/input/recht_33.odp +++ b/testautomation/graphics/required/input/recht_33.odp diff --git a/testautomation/graphics/required/input/recht_34.odp b/testautomation/graphics/required/input/recht_34.odp Binary files differindex fbfe0ae7ffae..2dcbd561f9e5 100755..100644 --- a/testautomation/graphics/required/input/recht_34.odp +++ b/testautomation/graphics/required/input/recht_34.odp diff --git a/testautomation/graphics/required/input/recht_36.odp b/testautomation/graphics/required/input/recht_36.odp Binary files differindex a1f80f1109db..45f7fd3a47cb 100755..100644 --- a/testautomation/graphics/required/input/recht_36.odp +++ b/testautomation/graphics/required/input/recht_36.odp diff --git a/testautomation/graphics/required/input/recht_39.odp b/testautomation/graphics/required/input/recht_39.odp Binary files differindex feda53696ecf..bf649b488030 100755..100644 --- a/testautomation/graphics/required/input/recht_39.odp +++ b/testautomation/graphics/required/input/recht_39.odp diff --git a/testautomation/graphics/required/input/recht_46.odp b/testautomation/graphics/required/input/recht_46.odp Binary files differindex d6ec036f014d..e9de83b58c8b 100755..100644 --- a/testautomation/graphics/required/input/recht_46.odp +++ b/testautomation/graphics/required/input/recht_46.odp diff --git a/testautomation/graphics/required/input/recht_48.odp b/testautomation/graphics/required/input/recht_48.odp Binary files differindex 4d905a8fe4d8..f836b0521f8b 100755..100644 --- a/testautomation/graphics/required/input/recht_48.odp +++ b/testautomation/graphics/required/input/recht_48.odp diff --git a/testautomation/graphics/required/input/recht_49.odp b/testautomation/graphics/required/input/recht_49.odp Binary files differindex 445c11940122..88c93c2856b4 100755..100644 --- a/testautomation/graphics/required/input/recht_49.odp +++ b/testautomation/graphics/required/input/recht_49.odp diff --git a/testautomation/graphics/required/input/recht_55.odp b/testautomation/graphics/required/input/recht_55.odp Binary files differindex 2d63df264710..6e78d94e8c49 100755..100644 --- a/testautomation/graphics/required/input/recht_55.odp +++ b/testautomation/graphics/required/input/recht_55.odp diff --git a/testautomation/graphics/tools/id_tools_2.inc b/testautomation/graphics/tools/id_tools_2.inc index e5cf1a068adf..681a5ec7161a 100644 --- a/testautomation/graphics/tools/id_tools_2.inc +++ b/testautomation/graphics/tools/id_tools_2.inc @@ -835,24 +835,6 @@ sub id_005 ' tiFormatLayer ' not in impress end sub -'------------------------------------------------------------------------------ -sub id_006 - - printLog Chr(13) + "--------- id_006 ----------" - - call tiToolsSpellchecking - call tiToolsSpellcheckingAutomatic - call tiToolsThesaurus - call tiToolsHyphenation - call tiToolsAutoCorrect - call tChineseTranslation - call tiToolsMacro - call tiToolsGallery - call tiToolsEyedropper - call tiToolsOptions ' get just called one time here... - Call tToolsOptionsTest ' global one -end sub - '------------------------------------------------------------------------------- sub id_007 diff --git a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc index 12f52f48d2d4..434aae88f786 100644..100755 --- a/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc +++ b/testautomation/spreadsheet/required/includes/c_upd_toolsmenu.inc @@ -189,14 +189,14 @@ testcase tToolsSpellcheck '/// Click on 'Edit' – button printlog " Click on 'Edit' – button" OptionenBearbeiten.Click - Kontext "SilbentrennungOptionen" - Call DialogTest ( SilbentrennungOptionen ) + Kontext "HyphenationOptions" + Call DialogTest ( HyphenationOptions ) '/// Decrease 'Minimal word length' printlog " Decrease 'Minimal word length'" ZeichenVorUmbruch.More '/// Close dialog with 'Cancel' printlog " Close dialog with 'Cancel'" - SilbentrennungOptionen.Cancel + HyphenationOptions.Cancel Kontext "TabLinguistik" '/// Close dialog with 'Cancel' printlog " Close dialog with 'Cancel'" @@ -391,21 +391,17 @@ endcase testcase tToolsLanguageThesaurus '///<u><b>Tools – Language – Chinese Translation</b></u> - '/// Load document from 'gTesttoolPath + "spreadsheet\required\input\english.ods"' printlog " Load document from 'gTesttoolPath + spreadsheet\required\input\english.ods" Call hFileOpen (Convertpath (gTesttoolPath + "spreadsheet\required\input\english.ods" )) - '/// If the file is not editable, click the edit button on standardbar printlog "If the file is not editable, click the edit button on standardbar" call sMakeReadOnlyDocumentEditable Kontext "DocumentCalc" - '/// Enter 'blabla' in a cell - printlog " Enter 'blabla' in a cell" + printlog " Enter 'test' in a cell" Call fCalcSelectRange ("B2") - DocumentCalc.TypeKeys "blabla<Return><Up>" - '/// Open 'Thesaurus' dialog by 'Tools – Language – Thesaurus + DocumentCalc.TypeKeys "test<Return><Up>" printlog " Open 'Thesaurus' dialog by 'Tools – Language – Thesaurus" try - ToolsLanguageThesaurusCalc + ToolsLanguageThesaurus catch warnlog "Thesaurus did not work" call hCloseDocument @@ -413,34 +409,20 @@ testcase tToolsLanguageThesaurus endcatch Kontext "Thesaurus" DialogTest ( Thesaurus ) - '/// Click on 'Search' button - printlog " Click on 'Search' button" - Nachschlagen.Click - '/// Close messagebox with 'OK' - printlog " Close messagebox with 'OK'" - Kontext - if Active.exists then - Active.OK + printlog " Check if the cellcontent test is correctly read" + if CurrentWord.GetSelText <> "test" then + warnlog "The cellcontent is not test but is " & CurrentWord.GetSelText end if - Kontext "Thesaurus" - '/// Click on 'Language' button - printlog " Click on 'Language' button" - Sprache.Click - Kontext "SpracheAuswaehlen" - DialogTest ( SpracheAuswaehlen ) - '/// Verify that the list has entries - printlog " Verify that the list has entries" - If Auswahl.GetItemCount < 1 then - warnlog "There are no languages available" + printlog " Check that there are alternatives available" + if Alternatives.GetItemCount < 1 then + warnlog "There are no alternatives available" + else Alternatives.Select (1) + if ReplaceWith.GetText = "" then + warnlog "The repacle with field is empty" + end if end if - '/// Close 'Select Language' dialog with 'Cancel' - printlog " Close 'Select Language' dialog with 'Cancel'" - SpracheAuswaehlen.Cancel - Kontext "Thesaurus" - '/// Close 'Thesaurus' with 'Cancel' printlog " Close 'Thesaurus' with 'Cancel'" Thesaurus.Cancel - '/// Close document printlog " Close document" call hCloseDocument diff --git a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc index 93c90a31dec9..01c1bc91a7c4 100644..100755 --- a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc +++ b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc @@ -173,9 +173,9 @@ testcase tHyphenation_3 printlog "Tools/Hyphenation" ToolsLanguageHyphenate - Kontext "Silbentrennung" + Kontext "Hyphenation" - if Not Silbentrennung.Exists then + if Not Hyphenation.Exists then Warnlog "Unable to bring up Dialog 'Hyphenation'!" Call hCloseDocument goto endsub @@ -184,21 +184,21 @@ testcase tHyphenation_3 printlog "check if get 'fol=low-ing'" if Wort.Gettext <> testWordInHyphenationDlg then Warnlog "Expected " & testWordInHyphenationDlg & " but found " & Wort.Gettext - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if if NOT Vor.IsEnabled then Warnlog "the 'Vor' button is Not enabled, or something wrong!" - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if printlog "add '-' between 'fol' and 'lowing' using left arrow key" Vor.Click - Silbentrennung.OK + Hyphenation.OK ' Messagebox 'Start hypheantion from the beginning ? Kontext "Active" @@ -285,9 +285,9 @@ testcase tHyphenation_4 printlog "Tools/Hyphenation" ToolsLanguageHyphenate - Kontext "Silbentrennung" + Kontext "Hyphenation" - if Not Silbentrennung.Exists then + if Not Hyphenation.Exists then Call hCloseDocument goto endsub end if @@ -295,7 +295,7 @@ testcase tHyphenation_4 printlog "check if get 'fol=low-ing'" if Wort.Gettext <> testWordInHyphenationDlg1 then Warnlog "Expected " & testWordInHyphenationDlg1 & " but found " & Wort.Gettext - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if @@ -303,7 +303,7 @@ testcase tHyphenation_4 printlog "click left arrow key" if NOT Vor.IsEnabled then Warnlog "the Vor button is Not enabled, or something wrong!" - Silbentrennung.Cancel + Hyphenation.Cancel Call hCloseDocument goto endsub end if @@ -334,7 +334,7 @@ testcase tHyphenation_4 Sleep 1 printlog "close all dialogs" - Silbentrennung.OK + Hyphenation.OK ' Messagebox 'Start hypheantion from the beginning ? Kontext "Active" diff --git a/testautomation/writer/optional/includes/regexp/search.inc b/testautomation/writer/optional/includes/regexp/search.inc index ce3d946fe3b9..ccd959504900 100755 --- a/testautomation/writer/optional/includes/regexp/search.inc +++ b/testautomation/writer/optional/includes/regexp/search.inc @@ -1190,7 +1190,7 @@ function wSelectAttributeName(aNumber as integer, AsianSupport as boolean, SetSt Case 31 Select Case iSprache - Case 49: aSelectIt = "Silbentrennung" + Case 49: aSelectIt = "Hyphenation" Case else: Warnlog "Language not supported. No test" exit function end select @@ -1469,7 +1469,7 @@ sub wCheckAttribute(aNumber as integer) Case 28 '"Schriftstellung asiatische Schrift" Case 29 '"Schusterjungen" Case 30 '"Seitenvorlage" - Case 31 '"Silbentrennung" + Case 31 '"Hyphenation" Case 32 '"Skalierung" Case 33 '"Sprache" Case 34 '"Sprache asiatische Schrift" diff --git a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc index e4818c34029f..3dfd505d129c 100644..100755 --- a/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc +++ b/testautomation/writer/optional/includes/spellcheck/w_spellcheck.inc @@ -1227,11 +1227,9 @@ endcase ' ******************************************************************* testcase tToolsThesaurus + Dim sWordInitial as string - Dim sLanguageToBeSelected as string Dim sWordToBeFound as string - Dim sWordReplacedWith as string - Dim i as integer Dim TheFile as String PrintLog "- Tools / Thesaurus" @@ -1283,19 +1281,20 @@ testcase tToolsThesaurus '/// Call Thesaurus without a written word /// ToolsLanguageThesaurus Kontext "Thesaurus" - if Ersetzen.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!" - printlog "- enter one word and search" - Ersetzen.SetText sWordInitial - Nachschlagen.Click - Kontext "Active" - if Active.Exists then - Warnlog Active.Gettext - Active.ok - end if - Kontext "Thesaurus" - if Bedeutung.GetSelText(1) = "" then Warnlog "No meaning text" - if Ersetzen.Gettext = "" then Ersetzen.SetText = sWordInitial - sWordToBeFound = Ersetzen.GetText + if CurrentWord.GetSelText <> "" then Warnlog "- Though no word has been selected Current Word textfield is filled !" + if ReplaceWith.GetText <> "" then Warnlog "- Though no word has been selected there is a replacetext in the textfield!" + printlog "Set language dependent word in textfield Current Word" + CurrentWord.Settext sWordInitial + + wait 500 + if Alternatives.GetItemCount = 0 then + Warnlog "No alternatives text" + else + if ReplaceWith.Gettext <> Alternatives.GetText(Alternatives.GetSelIndex) then + Warnlog "Replace with textfield was not filled with word from alternative" + endif + endif + sWordToBeFound = ReplaceWith.GetText Thesaurus.OK Call wTypeKeys "<Home><Shift End>" wait 200 @@ -1310,166 +1309,156 @@ testcase tToolsThesaurus printlog " Open new preformatted-document where the formatting is set to the language we wish to test." call hFileOpen (TheFile,false) - Call sMakeReadOnlyDocumentEditable + Call sMakeReadOnlyDocumentEditable + + Call wTypeKeys sWordInitial + Call wTypeKeys "<Home><Right><Right>" - printlog "- check the language" - Call wTypeKeys sWordInitial + "<Home>" - '/// Check language in Thesaurus /// + printlog "- Replace ( select alternative with cursor within word )" ToolsLanguageThesaurus Kontext "Thesaurus" + wait 500 + if CurrentWord.GetSeltext = sWordInitial then + sWordToBeFound = ReplaceWith.Gettext + if Alternatives.GetItemCount > 0 then + printlog "Select last entry in alternatives list" + Alternatives.Select Alternatives.GetItemCount + Alternatives.TypeKeys "<Space>" + if ReplaceWith.Gettext = sWordToBeFound then + Warnlog "Though alternative was selected replace with was not changed" + else + sWordToBeFound = ReplaceWith.Gettext + end if + Thesaurus.OK + Call wTypeKeys "<Home><Shift End>" + wait 200 + EditCopy + if GetClipboardText <> sWordToBeFound then Warnlog "Text has not been correctly replaced, not => " + sWordToBeFound + " but => " + GetClipboardText + else + Warnlog "- No Alternative for current word" + Thesaurus.Ok + end if + else + Warnlog "Current word is not selected word !" + end if - Sprache.Click - Kontext "SpracheAuswaehlen" - select case iSprache ' iSystemSprache - case 01 : sLanguageToBeSelected = "English (USA)" - case 07 : sLanguageToBeSelected = "Русский" - case 03 : sLanguageToBeSelected = "Português" - case 31 : sLanguageToBeSelected = "Nederlands (NL)" - case 33 : sLanguageToBeSelected = "Français (France)" - case 34 : sLanguageToBeSelected = "Español (España)" - case 36 : sLanguageToBeSelected = "Madyar" - case 39 : sLanguageToBeSelected = "Italiano (Italia)" - case 45 : sLanguageToBeSelected = "Dansk" - case 46 : sLanguageToBeSelected = "svenska (Sverige)" - case 48 : sLanguageToBeSelected = "Polski" - case 49 : sLanguageToBeSelected = "Deutsch (Deutschland)" - end select - SpracheAuswaehlen.OK - Sleep 5 - + Call wTypeKeys "<Home><Shift End><Delete>" + Call wTypeKeys sWordInitial + + printlog "- Replace unchecked ( Cursor at words end )" + ToolsLanguageThesaurus Kontext "Thesaurus" - printlog "- Search for a Synonym" - '/// Search for a synonym /// - Synonym.Select 1 - wait 500 - sWordToBeFound = Synonym.GetSelText - if Ersetzen.GetText <> sWordToBeFound then Warnlog "Synonym has not been taken over" - Nachschlagen.Click - wait 500 - if Wort.GetSelText <> sWordToBeFound then Warnlog "Synonym has not been added to the word listand activated" - - printlog "- Search for a meaning" - '/// Search for a meaning /// wait 500 - Bedeutung.Select 1 - wait 500 - Nachschlagen.Click - Sleep 1 - Kontext "Active" - if Active.Exists then - printlog "- " + Active.Gettext - Active.Ok - Kontext "Thesaurus" - else ' Nur wenn Wort auch enthalten ist - Kontext "Thesaurus" - for i = 1 to 100 - if Bedeutung.GetSeltext <> "" then i = 101 - Sleep 1 - next i - sWordToBeFound = Bedeutung.GetSelText - if Instr ( Ersetzen.GetText, sWordToBeFound ) <> 0 then - Warnlog "Meaning has not been overtaken" - end if - end if + if CurrentWord.GetSeltext = sWordInitial then + sWordToBeFound = ReplaceWith.Gettext + if Alternatives.GetItemCount > 0 then + printlog "Select last entry in alternatives list" + Alternatives.Select Alternatives.GetItemCount + Alternatives.TypeKeys "<Space>" + if ReplaceWith.Gettext = sWordToBeFound then + Warnlog "Though alternative was selected replace with was not changed" + else + sWordToBeFound = ReplaceWith.Gettext + end if + Thesaurus.OK + Call wTypeKeys "<Home><Shift End>" + wait 200 + EditCopy + if GetClipboardText <> sWordToBeFound then Warnlog "Text has not been correctly replaced, not => " + sWordToBeFound + " but => " + GetClipboardText + else + Warnlog "- No Alternative for current word" + Thesaurus.Ok + end if + else + Warnlog "Current word is not selected word !" + end if + + '/// Close thesaurus and writerdocument /// + Call hCloseDocument +endcase - printlog "- Replace unchecked ( Cursor in front of words 1. character )" - '/// replace unchecked /// - sWordReplacedWith = Ersetzen.GetText - Thesaurus.OK - Call wTypeKeys "<Shift Home>" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText +' ******************************************************************* - Call wTypeKeys "<End><Shift Home><Delete>" + sWordInitial - Call wTypeKeys "<Home><Right><Right>" +testcase tToolsThesaurusSynonyms - printlog "- Replace unchecked ( Cursor in word )" - ToolsLanguageThesaurus - Kontext "Thesaurus" - wait 500 - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.OK - Call wTypeKeys "<Home><Shift End>" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText - else - Warnlog "- No Synonym when cursor is in word!" - Thesaurus.Ok - end if + Dim sWordInitial as string + Dim sNumberOfSuggestions as string + Dim sReplaceWithWord as string + Dim TheFile as String - Call wTypeKeys "<End><Shift Home><Delete>" - Call wTypeKeys sWordInitial + "<End><Left>" + PrintLog "- Tools / Thesaurus" - printlog "- Replace unchecked ( Cursor at words end )" - ToolsLanguageThesaurus - Kontext "Thesaurus" - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.OK - Call wTypeKeys "<Home><Shift End>" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + Trim$(GetClipboardText) - else - Warnlog "- No sysnonym when cursor pointed to words end!" - Thesaurus.Ok + printlog " Open document where the formatting is set to the language we wish to test." + TheFile = Convertpath (gTesttoolpath + "writer\optional\input\spellcheck\spellcheck_" + iSprache + ".odt") + if hFileExists ( TheFile ) <> TRUE then + Warnlog "Found no Document for the language you're testing in, Please inform the Test-Developer." + exit sub end if - Call wTypeKeys "<End><Shift Home><Delete>" - Call wTypeKeys sWordInitial + "<End><Left><Shift Mod1 Left>" + select case iSprache + case 01 : sWordInitial = "Morning" + case 03 : sWordInitial = "Confirmam" + case 07 : Printlog "- No Thesaurus in Russian!" + goto endsub + case 31 : sWordInitial = "Hulp" + case 33 : sWordInitial = "Payer" + case 34 : sWordInitial = "Suficiente" + case 36 : Printlog "- No Thesaurus in Hungarian!" + goto endsub + case 39 : sWordInitial = "Lingua" + case 45 : sWordInitial = "Først" + case 46 : sWordInitial = "Däng" + case 48 : sWordInitial = "wypowiedź" + case 49 : sWordInitial = "Mann" + case 55 : Printlog "- No Thesaurus in Portuguese (Brazil) !" + goto endsub + case 81 : Printlog "- No Thesaurus in Japanese!" + goto endsub + case 82 : Printlog "- No Thesaurus in Korean!" + goto endsub + case 86 : Printlog "- No Thesaurus in Chinese (simplified)!" + goto endsub + case 88 : Printlog "- No Thesaurus in Chinese (traditional)!" + goto endsub + case 30, 35, 36, 37, 42, 47, 48, 51, 90 + Printlog "- No Thesaurus available !" + goto endsub + case else : QAErrorlog "The language " + iSprache + " has no defined errortext. No Test!" + goto endsub + end select + + printlog "Open new preformatted-writerdocument" + call hFileOpen (TheFile,false) + Call sMakeReadOnlyDocumentEditable + Call wTypeKeys sWordInitial + Call wTypeKeys "<Shift Home>" - printlog "- Replace checked ( back to front )" - '/// replace checked /// - ToolsLanguageThesaurus - Kontext "Thesaurus" - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.Ok - Call wTypeKeys "<Home><Shift End><Shift Left>" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText + printlog "Open contextmenu in wrong word" + Call wTypeKeys "<Shift F10>" + printlog "Select 'Synonyms' in context menu" + Call hMenuSelectNr (13) + sNumberOfSuggestions=MenuGetItemCount - 2 + '/// Check if there is a suggestion and replace word /// + if sNumberOfSuggestions <=0 then + Warnlog "- No synonyms in Context menu for the first wrong word!" else - Nachschlagen.Click - Kontext "Active" - if Active.Exists then - Active.Ok - Kontext "Thesaurus" - Thesaurus.OK - end if + printlog "- Context menu has " + sNumberOfSuggestions + " synonyms for the 1. wrong word!" + sReplaceWithWord=hMenuItemGetText (1) + Call hMenuSelectNr (1) + Call wTypeKeys "<Shift Mod1 Left>" + try + EditCopy + if GetClipboardtext<> sReplaceWithWord then + Warnlog "- 1. wrong Word has not been replaced with " + sReplaceWithWord + " but "+ GetClipBoardtext + else + printlog "- 1. wrong word has been replaced with the 1. entry in context menu!" + end if + catch + endcatch end if + Call hCloseDocument + +endcase - Call wTypeKeys "<End><Shift Home><Delete>" - Call wTypeKeys sWordInitial + "<Home><Shift End>" - printlog "- Replace checked ( front to back )" - ToolsLanguageThesaurus - Kontext "Thesaurus" - if Synonym.GetItemCount >0 then - Synonym.Select 1 - sWordReplacedWith = Ersetzen.GetText - Thesaurus.Ok - Call wTypeKeys "<Home><Shift End>" - wait 200 - EditCopy - if GetClipboardText <> sWordReplacedWith then Warnlog "Text has not been correctly replaced, not => " + sWordReplacedWith + " but => " + GetClipboardText - else - Warnlog "- No sysnonym when word is marked!" - Thesaurus.Ok - end if - Call wTypeKeys "<End><Shift Home><Delete>" - Call wTypeKeys sWordInitial + "<Home><Right><Shift Right><Shift Right>" - printlog "- Part of Replace checked ( back to front ) - no checking anymore" - ToolsLanguageThesaurus - Kontext "Thesaurus" - Thesaurus.OK - '/// Close thesaurus and writerdocument /// - Call hCloseDocument -endcase diff --git a/testautomation/writer/required/includes/w_005_.inc b/testautomation/writer/required/includes/w_005_.inc index 830ce39adc24..93fe9ac0237b 100644..100755 --- a/testautomation/writer/required/includes/w_005_.inc +++ b/testautomation/writer/required/includes/w_005_.inc @@ -232,14 +232,55 @@ testcase tFormatChangeCase printlog " Open new document" Call hNewDocument printlog " Insert some text in document and select text" - Call wTypeKeys ("Hello World!") + Call wTypeKeys ("call him now ! please") Call wTypeKeys ("<Shift Home>") printlog " Format / Case Characters / Upper" hUseAsyncSlot( "FormatChangeCaseUpper" ) + EditCopy + if GetClipboardtext() <> "CALL HIM NOW ! PLEASE" then + Warnlog "Sentence not 'CALL HIM NOW ! PLEASE' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif printlog " Format / Case Characters / Lower" hUseAsyncSlot( "FormatChangeCaseLower" ) + EditCopy + if GetClipboardtext() <> "call him now ! please" then + Warnlog "Sentence not 'call him now ! please' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + + printlog " Format / Case Characters / Sentence Case" + FormatChangeCaseToSentence + EditCopy + if GetClipboardtext() <> "Call him now ! Please" then + Warnlog "Sentence not 'Call him now ! Please' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + + printlog " Format / Case Characters / Capitalize every word" + FormatChangeCaseCapitalizeEveryWord + EditCopy + if GetClipboardtext() <> "Call Him Now ! Please" then + Warnlog "Sentence not 'Call Him Now ! Please' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + + + printlog " Format / Case Characters / tOGGLE cASE" + FormatChangeCaseToggleCase + EditCopy + if GetClipboardtext() <> "cALL hIM nOW ! pLEASE" then + Warnlog "Sentence not 'cALL hIM nOW ! pLEASE' but " & GetClipboardtext() + else + printlog " " & GetClipboardtext() + endif + if ( gAsianSup ) then try diff --git a/testautomation/writer/required/includes/w_007_.inc b/testautomation/writer/required/includes/w_007_.inc index 57c83706029f..9b9a19ca8676 100644..100755 --- a/testautomation/writer/required/includes/w_007_.inc +++ b/testautomation/writer/required/includes/w_007_.inc @@ -155,9 +155,9 @@ testcase tToolsSpellcheck if OptionenBearbeiten.IsEnabled then OptionenBearbeiten.Click wait 500 - Kontext "SilbentrennungOptionen" - DialogTest ( SilbentrennungOptionen ) - SilbentrennungOptionen.Cancel + Kontext "HyphenationOptions" + DialogTest ( HyphenationOptions ) + HyphenationOptions.Cancel end if next i @@ -289,13 +289,6 @@ testcase tToolsThesaurus Kontext "Thesaurus" DialogTest ( Thesaurus ) - printlog " In 'Thesaurus' dialog click 'Language'" - Sprache.Click - Kontext "SpracheAuswaehlen" - DialogTest ( SpracheAuswaehlen ) - printlog " Close 'Language' dialog" - SpracheAuswaehlen.Cancel - Kontext "Thesaurus" printlog " Close 'Thesaurus' dialog" Thesaurus.Cancel PrintLog "Close active documents" @@ -390,11 +383,11 @@ testcase tToolsHyphenation end if end if - Kontext "Silbentrennung" + Kontext "Hyphenation" printlog " Close upcoming 'Hyphenation' dialog" - if Silbentrennung.Exists then - Call DialogTest ( Silbentrennung ) - Silbentrennung.Cancel + if Hyphenation.Exists then + Call DialogTest ( Hyphenation ) + Hyphenation.Cancel else Warnlog "Dialog 'Hyphenation' not up!" Kontext "Active" @@ -1294,11 +1287,11 @@ testcase tMasterDocToolsHyphenation end if end if - Kontext "Silbentrennung" + Kontext "Hyphenation" printlog " Close upcoming 'Hyphenation' dialog" - if ( Silbentrennung.Exists( 2 ) ) then - Call DialogTest ( Silbentrennung ) - Silbentrennung.Cancel + if ( Hyphenation.Exists( 2 ) ) then + Call DialogTest ( Hyphenation ) + Hyphenation.Cancel else Warnlog "Dialog 'Hyphenation' not up!" Kontext "Active" |