summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 17:49:45 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-01-05 17:49:45 +0000
commit02dd2e1f1f447fd51f1102f0cc1c35b0ae4c2a4f (patch)
tree8f50daaab84d4e932136377998bd2f089b29f3df
parent3ac5c5751214dacbdae735493b9acd9e13e52e88 (diff)
CWS-TOOLING: integrate CWS overline3
2008-12-11 15:24:46 +0100 fredrikh r265314 : i97099 2008-12-11 15:20:37 +0100 fredrikh r265313 : i97099 2008-12-11 15:18:00 +0100 fredrikh r265312 : i97099 2008-12-11 15:17:00 +0100 fredrikh r265311 : i97099 2008-12-11 15:13:20 +0100 fredrikh r265309 : i97144 2008-12-11 15:06:24 +0100 fredrikh r265306 : i97099 2008-11-24 10:41:42 +0100 fme r264213 : #i5991# Overline support 2008-11-24 10:39:53 +0100 fme r264212 : #i5991# Overline support 2008-11-24 10:02:13 +0100 fme r264209 : #5991# Overline support 2008-11-24 10:01:26 +0100 fme r264208 : #5991# Overline support 2008-11-24 09:59:11 +0100 fme r264207 : #5991# Overline support 2008-11-24 09:57:11 +0100 fme r264206 : #5991# Overline support 2008-11-14 10:36:44 +0100 fme r263667 : CWS-TOOLING: rebase CWS overline3 to trunk@263288 (milestone: DEV300:m35) 2008-11-13 16:12:13 +0100 fme r263649 : #i5991# migrate CWS overline3 to SVN.
-rwxr-xr-xtestautomation/global/hid/hid.lst28
-rwxr-xr-xtestautomation/global/tools/includes/required/t_menu.inc2
-rwxr-xr-xtestautomation/global/win/etab_e_g.win2
-rwxr-xr-xtestautomation/writer/optional/includes/formatcharacter/w_format_character1.inc797
-rwxr-xr-xtestautomation/writer/optional/includes/stylist/w_stylist.inc287
-rwxr-xr-xtestautomation/writer/optional/w_formatcharacter.bas17
6 files changed, 685 insertions, 448 deletions
diff --git a/testautomation/global/hid/hid.lst b/testautomation/global/hid/hid.lst
index 50ceb1366..1ca3f4263 100755
--- a/testautomation/global/hid/hid.lst
+++ b/testautomation/global/hid/hid.lst
@@ -7119,19 +7119,21 @@ svx:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE 704636522
svx:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_SIZE 704636532
svx:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_CTL_SIZE 704636542
svx:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE_NOCJK 704636844
-svx:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS 704644302
-svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE 704644831
-svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW 704644832
-svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_BLINKING 704644833
-svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_CHARHIDDEN 704644836
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE 704646857
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE_COLOR 704646859
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_STRIKEOUT 704646861
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS 704646864
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION 704646866
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_FONTCOLOR 704646868
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EFFECTS2 704646878
-svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF 704646883
+svx:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS 704644327
+svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE 704644816
+svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW 704644817
+svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_BLINKING 704644818
+svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_CHARHIDDEN 704644819
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE 704646884
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE_COLOR 704646886
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_STRIKEOUT 704646882
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS 704646898
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION 704646900
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_FONTCOLOR 704646858
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EFFECTS2 704646861
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF 704646863
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE 704646878
+svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE_COLOR 704646880
svx:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_HIGHPOS 704660269
svx:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_NORMALPOS 704660270
svx:RadioButton:RID_SVXPAGE_CHAR_POSITION:RB_LOWPOS 704660271
diff --git a/testautomation/global/tools/includes/required/t_menu.inc b/testautomation/global/tools/includes/required/t_menu.inc
index f545d663a..6bbf65ee4 100755
--- a/testautomation/global/tools/includes/required/t_menu.inc
+++ b/testautomation/global/tools/includes/required/t_menu.inc
@@ -300,7 +300,7 @@ function hMenuFindSelect(MenuID as variant, SelectSlot as Boolean, ExpectedNr as
hMenuClose()
endif
endif 'StringType = TRUE
- wait 200 'Wait 0,2 seconds in case we just have called a Submenu.
+ wait 500 'Wait 0,5 seconds in case we just have called a Submenu.
end function
diff --git a/testautomation/global/win/etab_e_g.win b/testautomation/global/win/etab_e_g.win
index 0dc1d3a90..03539cdd1 100755
--- a/testautomation/global/win/etab_e_g.win
+++ b/testautomation/global/win/etab_e_g.win
@@ -135,6 +135,8 @@ IndividualWords svx:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS
Emphasis svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS
Position svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION
Outline svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE
+Overline svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE
+OverlineColor svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE_COLOR
Shadow svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW
Blinking svx:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_BLINKING
Relief svx:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF
diff --git a/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc b/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
index 75ae59da7..863104c43 100755
--- a/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
+++ b/testautomation/writer/optional/includes/formatcharacter/w_format_character1.inc
@@ -37,7 +37,7 @@
'\***********************************************************************
testcase tFormatCharacter1
- printlog "- Check if 'Pair Kerning' is enabled by default!"
+ printlog "- Check if 'Pair Kerning' is enabled by default!"
'/// Format / Character / Tab Position ///
Call hNewDocument
'/// Open new document
@@ -76,336 +76,329 @@ endcase
'------------------------------------------------------------------------------------------------------------------------------
testcase tFormatCharacter2
- '/// Format / Default ///
- Call hNewDocument
- '/// New document ///
- Printlog " - adjust Font- and Paragraph-Format"
- Call wTypeKeys "Format<Shift Mod1 Left>"
- '/// Insert a word and select it ///
- FormatCharacter
- '/// Select Format / Character and adjust Font- and Paragraph-Formats ///
- Sleep 5
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- Outline.Check
- Shadow.Check
- Underline.Select 2
- StrikeThrough.Select 2
- TabFontEffects.OK
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
- Automatisch.Check
- TabEinzuegeUndAbstaende.OK
- '/// Close dialog ///
- Wait 500
-
- Printlog " - Format / Default"
- '/// Select Format / Default ///
- FormatDefaultWriter
- Wait 500
-
- Printlog " - check Font- and Paragraph-Formats"
- '/// Check if Font- and Paragraph-Formats have benn set to default ///
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if Outline.IsChecked then Warnlog "Outline is checked"
- if Shadow.IsChecked then Warnlog "Shadow is checked"
- if Underline.GetSelIndex = 2 then Warnlog "Wrong entry in 'Underline' is selected"
- if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry in 'StrikeThrough' is selected"
- TabFontEffects.OK
- FormatParagraph
- Kontext
- active.SetPage TabEinzuegeUndAbstaende
- kontext "TabEinzuegeUndAbstaende"
- if Automatisch.IsChecked then Warnlog "Automatic is checked"
- TabEinzuegeUndAbstaende.OK
-
- '/// Close document ///
- Call hCloseDocument
+ '/// Format / Default ///
+ '/// New document ///
+ Call hNewDocument
+ Printlog " - adjust Font- and Paragraph-Format"
+ '/// Insert a word and select it ///
+ Call wTypeKeys "Format<Shift Mod1 Left>"
+ '/// Select Format / Character and adjust Font- and Paragraph-Formats ///
+ FormatCharacter
+ Sleep 5
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Outline.Check
+ Shadow.Check
+ Underline.Select 2
+ StrikeThrough.Select 2
+ TabFontEffects.OK
+ FormatParagraph
+ Kontext
+ active.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ Automatisch.Check
+ '/// Close dialog ///
+ TabEinzuegeUndAbstaende.OK
+ Wait 500
+
+ Printlog " - Format / Default"
+ FormatDefaultWriter
+ Wait 500
+
+ Printlog " - check Font- and Paragraph-Formats"
+
+ '/// Check if Font- and Paragraph-Formats have benn set to default ///
+ FormatCharacter
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ if Outline.IsChecked then Warnlog "Outline is checked"
+ if Shadow.IsChecked then Warnlog "Shadow is checked"
+ if Underline.GetSelIndex = 2 then Warnlog "Wrong entry in 'Underline' is selected"
+ if StrikeThrough.GetSelIndex = 2 then Warnlog "Wrong entry in 'StrikeThrough' is selected"
+ TabFontEffects.OK
+
+ FormatParagraph
+ Kontext
+ active.SetPage TabEinzuegeUndAbstaende
+ kontext "TabEinzuegeUndAbstaende"
+ if Automatisch.IsChecked then Warnlog "Automatic is checked"
+ TabEinzuegeUndAbstaende.OK
+
+ '/// Close document ///
+ Call hCloseDocument
endcase
'------------------------------------------------------------------------------------------------------------------------------
testcase tFormatCharacter3
- Dim Vergleich1 as integer
+ Dim Vergleich1 as integer
Dim Vergleich2 as string
Dim Vergleich3 as string
Dim Vergleich4 as string
Dim vLink as integer
- '/// Format / Character ///
- PrintLog "- Format / Character"
-
- '/// New document ///
- Call hNewDocument
- printlog " - adjust character"
- '/// Select Format / Character ///
- FormatCharacter
- Sleep 5
- Kontext
- '/// On Tabpage 'Font' adjust settings ///
- active.SetPage TabFont
- kontext "TabFont"
- try
- FontWest.Select 1
- Vergleich2 = FontWest.GetSelText
- Vergleich1 = StyleWest.GetItemCount
- StyleWest.Select Vergleich1
- Vergleich3 = StyleWest.GetSelText
- SizeWest.Select 24
- catch
- Font.Select 1
- Vergleich2 = Font.GetSelText
- Vergleich1 = Style.GetItemCount
- Style.Select Vergleich1
- Vergleich3 = Style.GetSelText
- Size.Select 24
- endcatch
- wait 100
- Kontext
- '/// On Tabpage 'Font Effects' adjust settings ///
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- Blinking.Check
- Kontext
- Active.Setpage TabFontPosition
- '/// On Tabpage 'Font Position ' adjust settings ///
- Kontext "TabFontPosition"
- Spacing.Select 2
- SpacingBy.More 3
- Vergleich4 = SpacingBy.GetText
- if Right ( Vergleich4, 2 ) <> "pt" then Warnlog "Wrong Unit at Spacing by"
- Kontext
- '/// On Tabpage 'Hyperlink' adjust settings ///
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- URLName.SetText "www.mikeportnoy.com"
- NameText.SetText "A hyperlink with testtool"
- TargetFrame.Select 2
- Select Case iSprache
+ '/// Format / Character ///
+ PrintLog "- Format / Character"
+
+ '/// New document ///
+ Call hNewDocument
+ printlog " - adjust character"
+ '/// Select Format / Character ///
+ FormatCharacter
+ WaitSlot (5)
+ Kontext
+ '/// On Tabpage 'Font' adjust settings ///
+ active.SetPage TabFont
+ kontext "TabFont"
+ try
+ FontWest.Select 1
+ Vergleich2 = FontWest.GetSelText
+ Vergleich1 = StyleWest.GetItemCount
+ StyleWest.Select Vergleich1
+ Vergleich3 = StyleWest.GetSelText
+ SizeWest.Select 24
+ catch
+ Font.Select 1
+ Vergleich2 = Font.GetSelText
+ Vergleich1 = Style.GetItemCount
+ Style.Select Vergleich1
+ Vergleich3 = Style.GetSelText
+ Size.Select 24
+ endcatch
+ wait 100
+ Kontext
+ '/// On Tabpage 'Font Effects' adjust settings ///
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ Blinking.Check
+ Kontext
+ Active.Setpage TabFontPosition
+ '/// On Tabpage 'Font Position ' adjust settings ///
+ Kontext "TabFontPosition"
+ Spacing.Select 2
+ SpacingBy.More 3
+ Vergleich4 = SpacingBy.GetText
+ if Right ( Vergleich4, 2 ) <> "pt" then Warnlog "Wrong Unit at Spacing by"
+ Kontext
+ '/// On Tabpage 'Hyperlink' adjust settings ///
+ active.SetPage TabHyperlinkZeichen
+ kontext "TabHyperlinkZeichen"
+ URLName.SetText "www.mikeportnoy.com"
+ NameText.SetText "A hyperlink with testtool"
+ TargetFrame.Select 2
+ Select Case iSprache
Case 36
vLink = 2
Case else
vLink = 6
end select
UnbesuchterLink.Select vLink
-
- Kontext
- active.SetPage TabHintergrund
- kontext "TabHintergrund"
- Sleep 1
- Hintergrundfarbe.Typekeys "<Down><Left>", 4
- TabHintergrund.OK
- '/// Close dialog and reopen with Format / Character ///
-
- Call wTypeKeys "This is formatted text <Home><Right>"
-
- printlog " - check character"
-
- '/// Check settings made ///
- Call wTypeKeys "<Home><Right>"
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
- if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
- if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing activated, is not the 2. but " + Spacing.GetSelText
- if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong Value selected. Not: " + Vergleich4 +" but " + SpacingBy.GetText
-
- Kontext
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#Wrong URL : " + URLName.GetText
- SetClipboard UrlName.Gettext
- if NameText.GetText <> "A hyperlink with testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
- if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
- if UnbesuchterLink.GetSelIndex <> vLink then Warnlog "Wrong Style for unused Link :" + UnbesuchterLink.GetSelIndex
- TabHyperlinkZeichen.OK
-
- if gApplication = "WRITER" then
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odt", "writer8")
- else
- Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odm", "writer8") 'gMasterDocFilter
- end if
- '/// Save document as '../user/work/format1.sxw' and close it ///
-
- if getclipboardtext="http://www.mikeportnoy.com/" then
- printlog " - activate Link"
- end if
- Sleep 20
-
- printlog " - check saved character format"
- Sleep 1
- Call hCloseDocument
- Sleep 2
- if gApplication = "WRITER" then
- Call hFileOpen ( gOfficePath + "user\work\format1.odt" )
- else
- Call hFileOpen ( gOfficePath + "user\work\format1.odm" )
- end if
- Call wTypeKeys "<Home><Right>"
- Wait 500
- '/// Reopen previous saved documentand check settings made under Format / Character ///
-
- FormatCharacter
-
- Sleep 3
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
- if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
- catch
- if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
- if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
- endcatch
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
- Kontext
- Active.Setpage TabFontPosition
- Kontext "TabFontPosition"
- if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing selected. Not 2. but " + Spacing.GetSelText
- if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong value selectzed. Not " + Vergleich4 +" but " + SpacingBy.GetText
- Kontext
- active.SetPage TabHyperlinkZeichen
- kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#Wrong URL : " + URLName.GetText
- if NameText.GetText <> "A hyperlink with testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
- if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
- TabHyperlinkZeichen.OK
- '/// Close document ///
- Call hCloseDocument
+ kontext
+ active.SetPage TabHintergrund
+ kontext "TabHintergrund"
+ Sleep 1
+ Hintergrundfarbe.Typekeys "<Down><Left>", 4
+ TabHintergrund.OK
+ '/// Close dialog and reopen with Format / Character ///
+
+ Call wTypeKeys "This is formatted text <Home><Right>"
+
+ printlog " - check character"
+
+ '/// Check settings made ///
+ Call wTypeKeys "<Home><Right>"
+ FormatCharacter
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
+ try
+ if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
+ if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ StyleWest.GetSelText
+ if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
+ catch
+ if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
+ if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ Style.GetSelText
+ if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
+ endcatch
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
+ Kontext
+ Active.Setpage TabFontPosition
+ Kontext "TabFontPosition"
+ if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing activated, is not the 2. but " + Spacing.GetSelText
+ if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong Value selected. Not: " + Vergleich4 +" but " + SpacingBy.GetText
+
+ Kontext
+ active.SetPage TabHyperlinkZeichen
+ kontext "TabHyperlinkZeichen"
+ if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#Wrong URL : " + URLName.GetText
+ SetClipboard UrlName.Gettext
+ if NameText.GetText <> "A hyperlink with testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
+ if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
+ if UnbesuchterLink.GetSelIndex <> vLink then Warnlog "Wrong Style for unused Link :" + UnbesuchterLink.GetSelIndex
+ TabHyperlinkZeichen.OK
+
+ if gApplication = "WRITER" then
+ Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odt", "writer8")
+ else
+ Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\format1.odm", "writer8") 'gMasterDocFilter
+ end if
+ '/// Save document as '../user/work/format1.sxw' and close it ///
+
+ if getclipboardtext="http://www.mikeportnoy.com/" then
+ printlog " - activate Link"
+ end if
+ Sleep 20
+
+ printlog " - check saved character format"
+ Sleep 1
+ Call hCloseDocument
+ Sleep 2
+ if gApplication = "WRITER" then
+ Call hFileOpen ( gOfficePath + "user\work\format1.odt" )
+ else
+ Call hFileOpen ( gOfficePath + "user\work\format1.odm" )
+ end if
+ Call wTypeKeys "<Home><Right>"
+ Wait 500
+ '/// Reopen previous saved documentand check settings made under Format / Character ///
+
+ FormatCharacter
+ WaitSlot (3)
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
+ try
+ if FontWest.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ FontWest.GetSelText
+ if StyleWest.GetSelText <> Vergleich3 then Warnlog "FontStyle should " + Vergleich3 + " is "+ StyleWest.GetSelText
+ if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
+ catch
+ if Font.GetSelIndex <> 1 then Warnlog "Font should "+ Vergleich2 +" is "+ Font.GetSelText
+ if Style.GetSelText <> Vergleich3 then Warnlog "FontStyle should " +Vergleich3+" is "+ Style.GetSelText
+ if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
+ endcatch
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ if NOT Blinking.IsChecked then Warnlog "Blinking is not checked"
+ Kontext
+ Active.Setpage TabFontPosition
+ Kontext "TabFontPosition"
+ if Spacing.GetSelIndex <> 2 then Warnlog "Wrong Spacing selected. Not 2. but " + Spacing.GetSelText
+ if SpacingBy.GetText <> Vergleich4 then Warnlog "Wrong value selectzed. Not " + Vergleich4 +" but " + SpacingBy.GetText
+ Kontext
+ active.SetPage TabHyperlinkZeichen
+ kontext "TabHyperlinkZeichen"
+ if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#Wrong URL : " + URLName.GetText
+ if NameText.GetText <> "A hyperlink with testtool" then Warnlog "Wrong Linkname : " + NameText.GetText
+ if TargetFrame.GetSelIndex <> 2 then Warnlog "Wrong Target selected : " + TargetFrame.GetSelText
+ TabHyperlinkZeichen.OK
+ '/// Close document ///
+ Call hCloseDocument
endcase
'------------------------------------------------------------------------------------------------------------------------------
testcase tFormatHyperlink
- ' /// This testcase has been written due to bug #109488
- '/// Open a new writerdocument
- Call hNewDocument
- '/// Enter a URL (www.sun.com) in document
- Call wTypeKeys "Autocorrect my URL www.sun.com"
- '/// Enter a space after URL
- Call wTypeKeys " "
- '/// URL should have been autocompleted to http://www.sun.com
- Call wTypeKeys "<Left>",7
- FormatCharacter
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.sun.com/" then
- Warnlog "Autocorrection for hyperlink does not work!"
- else
- printlog "Hyperlink has been auto-corrected"
- end if
- TabHyperlinkZeichen.Cancel
+ ' /// This testcase has been written due to bug #109488
+ '/// Open a new writerdocument
+ Call hNewDocument
+ '/// Enter a URL (www.sun.com) in document
+ Call wTypeKeys "Autocorrect my URL www.sun.com"
+ '/// Enter a space after URL
+ Call wTypeKeys " "
+ '/// URL should have been autocompleted to http://www.sun.com
+ Call wTypeKeys "<Left>",7
+ FormatCharacter
+ Kontext
+ Active.Setpage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ if URLName.GetText <> "http://www.sun.com/" then
+ Warnlog "Autocorrection for hyperlink does not work!"
+ else
+ printlog "Hyperlink has been auto-corrected"
+ end if
+ TabHyperlinkZeichen.Cancel
- '/// Change URL to www.sauna.com
- Call wTypeKeys "a"
- Call wTypeKeys "<Left>" ,2
- Call wTypeKeys "a"
-
- '/// Check whether URL has been changed
- FormatCharacter
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.sun.com/" then
- Warnlog "Autocorrection for hyperlink should not have been affected to URL!"
- else
- printlog "Hyperlink has not been auto-corrected"
- end if
- TabHyperlinkZeichen.Cancel
- '/// Close document
- Call hCloseDocument
+ '/// Change URL to www.sauna.com
+ Call wTypeKeys "a"
+ Call wTypeKeys "<Left>" ,2
+ Call wTypeKeys "a"
+
+ '/// Check whether URL has been changed
+ FormatCharacter
+ Kontext
+ Active.Setpage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ if URLName.GetText <> "http://www.sun.com/" then
+ Warnlog "Autocorrection for hyperlink should not have been affected to URL!"
+ else
+ printlog "Hyperlink has not been auto-corrected"
+ end if
+ TabHyperlinkZeichen.Cancel
+ '/// Close document
+ Call hCloseDocument
endcase
'------------------------------------------------------------------------------------------------------------------------------
testcase tFormatStyles1
- Dim iMenuEntry as integer
-
+ Dim iMenuEntry as integer
+
if hIsExtensionAlreadyInstalled("SunSearchToolbar.oxt") = true then
- iMenuEntry = 5
+ iMenuEntry = 6
else
- iMenuEntry = 4
- end if
- '/// All format styles in context-menu ///
- '/// Open a new document ///
- Call hNewDocument
- printlog "- Style 'Bold' "
- '/// Write 'Style Bold' - execute Context menu 'Style Bold'
- Call wTypeKeys "Style Bold"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuSelectNr(iMenuEntry) ' entry should be 'Style'
- wait 500
- Call hMenuSelectNr(1)
- wait 500
- ' /// Check if changes to style have been made ///
- Kontext "TextObjectbar"
- if Fett.Getstate(2) = 0 then
- Warnlog "Style 'Bold' with context menu has not been set!"
+ iMenuEntry = 5
end if
+ '/// All format styles in context-menu ///
+ '/// Open a new document ///
+ Call hNewDocument
+ printlog "- Style 'Bold' "
+ '/// Write 'Style Bold' - execute Context menu 'Style Bold'
+ Call wTypeKeys "Style Bold"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:Bold", true, 1, false) 'Find 'Bold' and call the slot.
+ '/// Check if changes to style have been made ///
+ Kontext "TextObjectbar"
+ if Fett.Getstate(2) = 0 then
+ Warnlog "Style 'Bold' with context menu has not been set!"
+ end if
- Call wTypeKeys "<End><Mod1 Shift X>"
- wait 500
- Call wTypeKeys "<Return>"
-
- printlog "- Style 'Italic' "
- '/// Write 'Style Itlaic' - execute Context menu 'Style Italic'
- Call wTypeKeys "Style Italic"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuSelectNr(iMenuEntry) ' entry should be 'Style'
- wait 500
- Call hMenuSelectNr(2)
- wait 500
+ Call wTypeKeys "<End><Mod1 Shift X>"
+ wait 500
+ Call wTypeKeys "<Return>"
+
+ printlog "- Style 'Italic' "
+ '/// Write 'Style Italic' - execute Context menu 'Style Italic'
+ Call wTypeKeys "Style Italic"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:Italic", true, 2, false) 'Find 'Italic' and call the slot.
' /// Check if changes to style have been made ///
- Kontext "TextObjectbar"
- if Kursiv.Getstate(2) = 0 then
- Warnlog "#58722#Style 'Italic' with context menu has not been set!"
- end if
+ Kontext "TextObjectbar"
+ if Kursiv.Getstate(2) = 0 then
+ Warnlog "#58722#Style 'Italic' with context menu has not been set!"
+ end if
Call wTypeKeys "<End><Right>"
Call wTypeKeys "<Return>"
-
- printlog "- Style 'Underline' "
- '/// Write 'Style Underline' - execute Context menu 'Style Underline'
- Call wTypeKeys "Style Underline"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuSelectNr(iMenuEntry) ' entry should be 'Style'
- wait 500
- Call hMenuSelectNr(3)
- wait 500
+
+ printlog "- Style 'Underline' "
+ '/// Write 'Style Underline' - execute Context menu 'Style Underline'
+ Call wTypeKeys "Style Underline"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:Underline", true, 4, false) 'Find 'Underline' and call the slot.
' /// Check if changes to style have been made ///
FormatCharacter
Kontext
@@ -416,16 +409,32 @@ testcase tFormatStyles1
Call wTypeKeys "<End><Right>"
Call wTypeKeys "<Return>"
- printlog "- Style 'StrikeThrough' "
- '/// Write 'Style Strikethrough' - execute Context menu 'Style Strikethrough'
- Call wTypeKeys "Style Strikethrough"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuSelectNr(iMenuEntry) ' entry should be 'Style'
- wait 500
- Call hMenuSelectNr(4)
- wait 500
+ printlog "- Style 'Overline' "
+ '/// Write 'Style Overline' - execute Context menu 'Style Strikethrough'
+ Call wTypeKeys "Style Overline"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:Overline", true, 3, false) 'Find 'Overline' and call the slot.
+ ' /// Check if changes to style have been made ///
+ FormatCharacter
+ Kontext
+ Active.Setpage TabFontEffects
+ Kontext "TabFontEffects"
+ if Overline.GetSelIndex <> 2 then Warnlog "Style 'Overline' with context menu has not been set!"
+ TabFontEffects.Cancel
+ Call wTypeKeys "<End><Right>"
+ Call wTypeKeys "<Return>"
+
+ printlog "- Style 'StrikeThrough' "
+ '/// Write 'Style Strikethrough' - execute Context menu 'Style Strikethrough'
+ Call wTypeKeys "Style Strikethrough"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:Strikeout", true, 5, false) 'Find 'Strikethrough' and call the slot.
' /// Check if changes to style have been made ///
FormatCharacter
Kontext
@@ -436,16 +445,14 @@ testcase tFormatStyles1
Call wTypeKeys "<End>"
Call wTypeKeys "<Right><Return>"
- printlog "- Style 'Shadow' "
- '/// Write 'Style Shadow' - execute Context menu 'Style Shadow'
- Call wTypeKeys "Style Shadow"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuSelectNr(iMenuEntry) ' entry should be 'Style'
- wait 500
- Call hMenuSelectNr(5)
- wait 500
+ printlog "- Style 'Shadow' "
+ '/// Write 'Style Shadow' - execute Context menu 'Style Shadow'
+ Call wTypeKeys "Style Shadow"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:Shadowed", true, 6, false) 'Find 'Shadowed' and call the slot.
' /// Check if changes to style have been made ///
FormatCharacter
Kontext
@@ -456,16 +463,14 @@ testcase tFormatStyles1
Call wTypeKeys "<End><Right>"
Call wTypeKeys "<Return>"
- printlog "- Style 'Outline' "
- '/// Write 'Style Outline' - execute Context menu 'Style Outline'
- Call wTypeKeys "Style Outline"
- Call wTypeKeys "<Shift Home>"
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- Call hMenuSelectNr(iMenuEntry) ' entry should be 'Style'
- wait 500
- Call hMenuSelectNr(6)
- wait 500
+ printlog "- Style 'Outline' "
+ '/// Write 'Style Outline' - execute Context menu 'Style Outline'
+ Call wTypeKeys "Style Outline"
+ Call wTypeKeys "<Shift Home>"
+ Kontext "DocumentWriter"
+ DocumentWriter.OpenContextMenu
+ Call hMenuFindSelect (".uno:StyleMenu", true, 5, false) 'Find 'Style' and call the slot.
+ Call hMenuFindSelect (".uno:OutlineFont", true, 7, false) 'Find 'Outline' and call the slot.
' /// Check if changes to style have been made ///
FormatCharacter
Kontext
@@ -474,8 +479,8 @@ testcase tFormatStyles1
if Outline.IsChecked = false then Warnlog "Style 'Outline' with context menu has not been set!"
TabFontEffects.Cancel
- Call hCloseDocument
-
+ printlog "Close Document."
+ Call hCloseDocument
endcase
'---------------------------------------------------------------------------------------------------------------------
@@ -598,9 +603,9 @@ testcase tFormatCharacter
Call hCloseDocument
Sleep 2
if gApplication = "WRITER" then
- Call hFileOpen ( gOfficePath + "user\work\format1.odt" )
+ Call hFileOpen ( gOfficePath + "user\work\format1.odt" )
else
- Call hFileOpen ( gOfficePath + "user\work\format1.odm" )
+ Call hFileOpen ( gOfficePath + "user\work\format1.odm" )
end if
Call wTypeKeys "<Home><Right>"
Wait 500
@@ -613,13 +618,13 @@ testcase tFormatCharacter
active.SetPage TabFont
kontext "TabFont"
try
- if FontWest.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ FontWest.GetSelText
- if StyleWest.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ StyleWest.GetSelText
- if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
+ if FontWest.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ FontWest.GetSelText
+ if StyleWest.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ StyleWest.GetSelText
+ if SizeWest.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + SizeWest.GetSelText
catch
- if Font.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ Font.GetSelText
- if Style.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ Style.GetSelText
- if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
+ if Font.GetSelText <> Vergleich2$ then Warnlog "Font should "+ Vergleich2$ +" is "+ Font.GetSelText
+ if Style.GetSelIndex <> Vergleich1% then Warnlog "FontStyle should " +Vergleich3$+" is "+ Style.GetSelText
+ if Size.GetSelIndex <> 24 then Warnlog "Wrong Font Size : " + Size.GetSelText
endcatch
Kontext
active.SetPage TabFontEffects
@@ -642,3 +647,121 @@ testcase tFormatCharacter
endcase
'------------------------------------------------------------------------------------------------------------------------------
+
+testcase tFormatCharacterOverline1
+ Dim iCounter as integer
+ Dim CompareValue1 as string
+ Dim CompareValue2 as string
+ Dim CompareValue3 as string
+ Dim CompareValue4 as string
+
+ Printlog " New Writer document."
+ Call hNewDocument
+ Printlog " Format Character."
+ FormatCharacter
+ Printlog " Tab 'Font Effects'."
+ Kontext
+ active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Printlog " Select Overline Listbox."
+ Printlog " Default (first) entry is 'Without'."
+ Overline.Select (1)
+
+ Printlog " Select Colour Listbox."
+ Printlog " Verify that Colour List box is DISABLED."
+ try
+ OverlineColor.Select (1)
+ warnlog "Color-listbox was falsely enabled."
+ catch
+ printlog "Color-listbox is correctly disabled by default."
+ endcatch
+
+ Printlog " Select Overline Listbox again."
+ Printlog " Select second entry 'Single'."
+ Overline.Select (2)
+
+ Printlog " Step down all 14 entries (Last: 'Double Wave' in English UI)."
+ for iCounter = 2 to Overline.GetItemCount
+ Overline.Select (iCounter)
+ wait (500)
+ next iCounter
+
+ Printlog " Select Color Listbox."
+ Printlog " Verify that Color List box is ENABLED."
+ try
+ OverlineColor.Select (OverlineColor.GetItemCount)
+ printlog "Color-listbox is correctly enabled."
+ catch
+ warnlog "Color-listbox was falsely disabled."
+ endcatch
+
+ 'CompareValue2 = OverlineColor.GetSelIndex
+
+ Printlog " Close dialog."
+ TabFontEffects.Ok
+ Printlog " Close document."
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------
+
+testcase tFormatCharacterOverline2
+ Dim CompareValue1 as string
+ Dim CompareValue2 as string
+ Dim CompareValue3 as string
+ Dim CompareValue4 as string
+ Dim SaveFilePathAndName as String
+
+ SaveFilePathAndName = gOfficePath + "user\work\OverlineTest2.odt"
+
+ Printlog " New Writer document."
+ Call hNewDocument
+ Printlog " Type 'Overline Single Red' (without quotes)."
+ Call wTypeKeys "Overline Single Red"
+ Printlog " Select entire string."
+ Call wTypeKeys "<HOME>"
+ Call wTypeKeys "<SHIFT END>"
+ Printlog " Format Character."
+ FormatCharacter
+ Printlog " Tab 'Font Effects'."
+ Kontext
+ active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Printlog " Select Overline Listbox."
+ Printlog " Select second entry 'Single'."
+ Overline.Select (2)
+
+ Printlog " Select Color Listbox."
+ Printlog " In Color List box, select Color 'Red', OK."
+ OverlineColor.Select (6)
+
+ CompareValue1 = Overline.GetSelIndex
+ CompareValue2 = OverlineColor.GetSelIndex
+
+ Printlog " Close dialog."
+ TabFontEffects.Ok
+
+ Printlog " Save document."
+ Call hFileSaveAsKill ( SaveFilePathAndName )
+ Printlog " Reload document."
+ FileReload
+ Printlog " Select entire string."
+ Call wTypeKeys "<HOME><SHIFT END>"
+ Printlog " Format Character."
+ FormatCharacter
+ Printlog " Tab 'Font Effects'."
+ Kontext
+ active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Printlog " Verify that 'Overline Single' and Overline Colour 'Red' is set."
+
+ If Overline.GetSelIndex <> CompareValue1 then warnlog "The Overline-Value wasn't saved after closing the options-dialogue."
+ If OverlineColor.GetSelIndex <> CompareValue2 then warnlog "The Color-Value wasn't saved after closing the options-dialogue."
+
+ Printlog " Close dialog."
+ TabFontEffects.Ok
+ Printlog " Close document."
+ Call hCloseDocument
+endcase
+
+'------------------------------------------------------------------------------------------------------------------------------
diff --git a/testautomation/writer/optional/includes/stylist/w_stylist.inc b/testautomation/writer/optional/includes/stylist/w_stylist.inc
index 70ecabb1e..91b8fd13a 100755
--- a/testautomation/writer/optional/includes/stylist/w_stylist.inc
+++ b/testautomation/writer/optional/includes/stylist/w_stylist.inc
@@ -43,6 +43,7 @@
' #1 tFormatStylist4
' #1 tFormatStylist5
' #1 tFormatStylist6
+' #1 tFormatStylist7
' #1 tAssigningStyles1
' #1 tAssigningStyles2
' #1 tAssigningStyles3
@@ -63,6 +64,7 @@ sub w_stylist
Call tFormatStylist4 ' search/create templates
Call tFormatStylist5 ' select templet in stylist
Call tFormatStylist6 ' new template from selection
+ Call tFormatStylist7 ' new template from selection, modified via ContextMenu.
Call tAssigningStyles1
Call tAssigningStyles2
Call tAssigningStyles3
@@ -77,7 +79,7 @@ end sub
' **********************************************************************
testcase tFormatStylist1
- Dim xPos as long
+ Dim xPos as long
Dim yPos as long
Dim xSize%
Dim ySize%
@@ -151,9 +153,9 @@ endcase
' **********************************************************************
testcase tFormatStylist2
- Dim xPos%
- Dim yPos%
- Dim xSize%
+ Dim xPos%
+ Dim yPos%
+ Dim xSize%
Dim ySize%
printlog "- Format/Stylist : Methods from Stylist as Window between more than one document"
@@ -226,9 +228,9 @@ testcase tFormatStylist3
printlog "- Format / Stylist : select all Style properties"
Call hNewDocument
- printlog " New writerdocument"
+ printlog " New writerdocument"
FormatStylist
- printlog "Select all style properties in stylist"
+ printlog "Select all style properties in stylist"
Kontext "Stylist"
if Stylist.NotExists then FormatStylist
printlog " - Paragraph Styles"
@@ -306,10 +308,10 @@ endcase
' **********************************************************************
testcase tFormatStylist4
- Dim i as Integer
- Dim AlterWert$
+ Dim i as Integer
+ Dim AlterWert$
Dim NeuerWert$
-
+
printlog "- Format / Stylist : check created Styles"
printlog "New writerdocument"
Call hNewDocument
@@ -340,21 +342,20 @@ testcase tFormatStylist4
if wStyleSelect ( "ATesttool", "Paragraph" ) = true then Warnlog "Paragraph Style has been found in new document"
if wStyleSelect ( "BTesttool", "Character" ) = true then Warnlog "Character Style has been found in new document"
- 'if wStyleSelect ( "CTesttool", "Frame" ) = true then Warnlog "Frame Style has been found in new document"
+ 'if wStyleSelect ( "CTesttool", "Frame" ) = true then Warnlog "Frame Style has been found in new document"
if wStyleSelect ( "DTesttool", "Page" ) = true then Warnlog "Page Style has been found in new document"
Call hCloseDocument
-
- printlog "Close document"
- Call hCloseDocument
+ printlog "Close document"
+ Call hCloseDocument
endcase
' **********************************************************************
testcase tFormatStylist5
- Dim SuchMal as string, i as integer
+ Dim SuchMal as string, i as integer
Dim bStyleFound as boolean
-
+
printlog "- Format / Stylist : select Style"
printlog "New writerdocument"
if bAsianLan = True then
@@ -383,7 +384,7 @@ testcase tFormatStylist5
printlog "Using " & SuchMal & " as 'default'"
Kontext "Stylist"
- Vorlagenliste.TypeKeys "<Home>"
+ Vorlagenliste.TypeKeys "<Home>"
bStyleFound = false
for i=1 to Vorlagenliste.GetItemCount
Vorlagenliste.Select i
@@ -417,100 +418,208 @@ endcase
' **********************************************************************
testcase tFormatStylist6
- Dim i as integer
+ Dim i as integer
printlog "- Format / Stylist : new Style from selection"
- printlog "New writerdocument"
+ printlog "New writerdocument"
+ Call hNewDocument
+ Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
+ printlog "create a new style from selection"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Shadow.Check
+ StrikeThrough.Select 2
+ Overline.Select 2
+ OverlineColor.Select 6
+ Outline.Check
+ Effects.Select 3
+ Blinking.Check
+ Kontext
+ Active.Setpage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ URLName.SetText "www.mikeportnoy.com"
+ TabHyperlinkZeichen.OK
+
+ printlog " - Create Character Style from selection"
+ Kontext "Stylist"
+ if not Stylist.Exists then FormatStylist
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ Sleep 1
- Call hNewDocument
- Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
- printlog "create a new style from selection"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- Shadow.Check
- StrikeThrough.Select 2
- Outline.Check
- Effects.Select 3
- Blinking.Check
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- URLName.SetText "www.mikeportnoy.com"
- TabHyperlinkZeichen.OK
+ AusSelektion.OpenMenu
+ Sleep 1
+ hMenuSelectNr(1)
+ Sleep 1
- printlog " - Create Character Style from selection"
- Kontext "Stylist"
+ Kontext "VorlageErzeugen"
+ if VorlageErzeugen.Exists then
+ VorlagenName.SetText "Testtool"
+ VorlageErzeugen.OK
+ else
+ Warnlog "Creating Style did not work. Dialog not up!"
+ end if
+
+ printlog " - assign new Character Style to a new text"
+ wTypeKeys "<Home><Down>",3
+ wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ if Vorlagenliste.GetSeltext <> "Testtool" then 'Go find the entry.
+ Vorlagenliste.TypeKeys "<Home>"
+ For i = 1 to 100
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
+ i = 102
+ end if
+ next i
+ end if
+ Vorlagenliste.TypeKeys "<Return>" 'Assign to text.
+ Stylist.Close
+ if i = 101 then
+ Warnlog "Created Style could not be found in Stylist!"
+ else
+ Printlog " - check Style"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
+ if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
+ if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
+ if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
+ if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
+ if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
+ if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
+ Kontext
+ Active.Setpage TabHyperlinkZeichen
+ Kontext "TabHyperlinkZeichen"
+ if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#TabHyperlink: URL is wrong " + URLName.Gettext
+ TabHyperlinkZeichen.OK
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
+endcase
+
+' **********************************************************************
+
+testcase tFormatStylist7
+ Dim i as integer
+
+ printlog "- Format / Stylist : new Style from selection, then modified via the ContextMenu."
+ printlog "New writerdocument"
+ Call hNewDocument
+ Call wTypeKeys "Creating a style from selection <Return><Up><Shift End>"
+ printlog "create a new style from selection"
+
+ printlog " - Create Character Style from selection"
+ Kontext "Stylist"
if not Stylist.Exists then FormatStylist
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- Sleep 1
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ Sleep 1
AusSelektion.OpenMenu
Sleep 1
hMenuSelectNr(1)
Sleep 1
-
- Kontext "VorlageErzeugen"
- if VorlageErzeugen.Exists then
- VorlagenName.SetText "Testtool"
- VorlageErzeugen.OK
- else
- Warnlog "Creating Style did not work. Dialog not up!"
- end if
- printlog " - assign new Character Style to a new text"
- wTypeKeys "<Home><Down>",3
- wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
- Kontext "Stylist"
- TBGestalter.Click ZeichenVorlagen
- Vorlagenliste.TypeKeys "<Home>"
- if Vorlagenliste.GetSeltext = "Testtool" then
- Vorlagenliste.TypeKeys "<Return>"
- else
- For i = 1 to 100
- Vorlagenliste.TypeKeys "<Down>"
- if Vorlagenliste.GetSeltext = "Testtool" then
- Vorlagenliste.TypeKeys "<Return>"
- i = 102
- end if
- next i
- end if
- Stylist.Close
- if i = 101 then
- Warnlog "Created Style could not be found in Stylist!"
- else
- Printlog " - check Style"
- FormatCharacter
- Kontext
- Active.SetPage TabFontEffects
- Kontext "TabFontEffects"
- if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
- if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
- if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
- if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
- if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
- Kontext
- Active.Setpage TabHyperlinkZeichen
- Kontext "TabHyperlinkZeichen"
- if URLName.GetText <> "http://www.mikeportnoy.com/" then Warnlog "#i41171#TabHyperlink: URL is wrong " + URLName.Gettext
- TabHyperlinkZeichen.OK
- end if
+ Kontext "VorlageErzeugen"
+ if VorlageErzeugen.Exists then
+ VorlagenName.SetText "Testtool"
+ VorlageErzeugen.OK
+ else
+ Warnlog "Creating Style did not work. Dialog not up!"
+ end if
- printlog "Close document"
- Call hCloseDocument
+ printlog " Open ContextMenu over the 'Testtool' Style."
+ Kontext "Stylist"
+ if not Stylist.Exists then FormatStylist
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+ if Vorlagenliste.GetSeltext <> "Testtool" then
+ Vorlagenliste.TypeKeys "<Home>"
+ For i = 1 to 100
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.GetSeltext = "Testtool" then
+ i = 102
+ end if
+ next i
+ if i = 101 then
+ warnlog "No Testtool -Stylist found. Check if new stylists can be created. Test ends."
+ goto endsub
+ end if
+ end if
+ Vorlagenliste.TypeKeys "<SHIFT F10>" 'Open ContextMenu
+ Sleep 1
+ printlog " Select 'Modify'"
+ Call hMenuSelectNr(2) 'Modify
+ Sleep 1
+
+ printlog " Goto Tabpage 'Font Effects' and change some settings."
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ Shadow.Check
+ StrikeThrough.Select 2
+ Overline.Select 2
+ OverlineColor.Select 6
+ Outline.Check
+ Effects.Select 3
+ Blinking.Check
+ TabFontEffects.OK
+
+ printlog " - assign new Character Style to a new text"
+ wTypeKeys "<Home><Down>",3
+ wTypeKeys "This is some new text <Return><Up><Up><Shift End>"
+ Kontext "Stylist"
+ TBGestalter.Click ZeichenVorlagen
+
+ if Vorlagenliste.GetSeltext <> "Testtool" then
+ Vorlagenliste.TypeKeys "<Home>"
+ For i = 1 to 100
+ Vorlagenliste.TypeKeys "<Down>"
+ if Vorlagenliste.GetSeltext = "Testtool" then 'Found it!
+ i = 102
+ end if
+ next i
+ end if
+ Vorlagenliste.TypeKeys "<Return>" 'Assign Style to Text.
+ Stylist.Close
+ if i = 101 then
+ Warnlog "Created Style could not be found in Stylist!"
+ else
+ Printlog " - check Style"
+ FormatCharacter
+ Kontext
+ Active.SetPage TabFontEffects
+ Kontext "TabFontEffects"
+ if NOT Shadow.IsChecked then Warnlog "Shadow is not checked anymore"
+ if StrikeThrough.GetSelIndex <> 2 then Warnlog "Wrong entry selection in StrikeThrough"
+ if Overline.GetSelIndex <> 2 then Warnlog "Overline is not checked anymore"
+ if OverlineColor.GetSelIndex <> 6 then Warnlog "Wrong Overline Color selected"
+ if NOT Outline.IsChecked then Warnlog "Outline is not checked anymore"
+ if Effects.GetSelIndex <> 3 then Warnlog "Wrong effect selected"
+ if NOT Blinking.IsChecked then Warnlog "Blinking is not checked anymore"
+ TabFontEffects.OK
+ end if
+
+ printlog "Close document"
+ Call hCloseDocument
endcase
' **********************************************************************
testcase tAssigningStyles1
- Dim i as integer
+ Dim i as integer
Dim sStyles() as string
Dim sTemp as string
Dim j as integer
Dim bStyleInList as boolean
-
+
printlog "UI and Strings check"
Call hNewDocument
printlog "Open a new writerdocument"
diff --git a/testautomation/writer/optional/w_formatcharacter.bas b/testautomation/writer/optional/w_formatcharacter.bas
index 335556022..93ae30cc0 100755
--- a/testautomation/writer/optional/w_formatcharacter.bas
+++ b/testautomation/writer/optional/w_formatcharacter.bas
@@ -42,26 +42,27 @@ sub main
StartTime = Now()
use "writer\tools\includes\w_tools.inc"
- use "writer\optional\includes\formatcharacter\w_format_character1.inc"
+ use "writer\optional\includes\formatcharacter\w_format_character1.inc"
printlog Chr(13) + "Loading of Include - Files takes: " + Wielange ( StartTime )
printlog Chr(13) + "******* Writer - Level 1 - Test *******"
Call hStatusIn ( "writer", "w_formatcharacter.bas","Formatting of characters" )
- Call tFormatCharacter
- Call tFormatStyles1 '-> Format/Styles with contect menu
- Call tFormatCharacter1 '-> Format/Pair Kerning
- Call tFormatCharacter2 '-> Format/Default
- Call tFormatCharacter3 '-> Format/Character
- Call tFormatHyperlink '-> Autocorrection of hyperlinks
+ Call tFormatCharacter
+ Call tFormatStyles1 '-> Format/Styles with contect menu
+ Call tFormatCharacter1 '-> Format/Pair Kerning
+ Call tFormatCharacter2 '-> Format/Default
+ Call tFormatCharacter3 '-> Format/Character
+ Call tFormatCharacterOverline1 '-> Format/Overline
+ Call tFormatCharacterOverline2 '-> Format/Overline (with save)
+ Call tFormatHyperlink '-> Autocorrection of hyperlinks
Call hStatusOut
Printlog Chr(13) + "End of Test :"
Printlog "Duration: "+ WieLange ( StartTime )
Printlog "Date: " + Date + " Time: " + Time
-
end sub
sub LoadIncludeFiles