summaryrefslogtreecommitdiff
path: root/testautomation/graphics/optional/includes/global/g_paragraph.inc
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-04-01 17:35:56 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-04-01 17:35:56 +0000
commit7fd7c0f1978bd577410409ecf011f38f4bf99e82 (patch)
tree47481b51ae9882e56fa3e188ce3078060bf24b45 /testautomation/graphics/optional/includes/global/g_paragraph.inc
parenta8b72db9a8052308d3de5da56d088c8df02abb0c (diff)
CWS-TOOLING: integrate CWS automation003
2009-04-01 09:25:55 +0200 hde r270300 : #i100664# 2009-03-31 14:45:05 +0200 jsk r270280 : #i96838 2009-03-31 14:37:11 +0200 jsk r270279 : #i96838 2009-03-31 12:47:41 +0200 jsk r270275 : #i100584 2009-03-31 12:44:46 +0200 jsk r270272 : #i96838 2009-03-31 11:42:57 +0200 jsk r270269 : #i100584 2009-03-31 11:37:16 +0200 jsk r270268 : #i96838 2009-03-31 08:43:06 +0200 jsk r270260 : #i99713 - continued 2009-03-31 08:38:12 +0200 hde r270259 : #i100664# 2009-03-31 07:50:01 +0200 jsk r270257 : #i99713 - continued 2009-03-30 15:40:05 +0200 jsk r270237 : #i96838 2009-03-30 15:17:58 +0200 jsk r270236 : #i100584 2009-03-30 15:05:31 +0200 hde r270235 : #i100664# 2009-03-30 14:56:58 +0200 hde r270234 : #i100664# 2009-03-30 11:43:04 +0200 oc r270206 : i100669 2009-03-30 09:54:46 +0200 jsk r270199 : #i99713 - partly done, needs checking 2009-03-30 09:46:25 +0200 hde r270198 : #i100664# 2009-03-30 09:46:05 +0200 hde r270197 : #i100664# 2009-03-30 09:45:09 +0200 hde r270196 : #i100664# 2009-03-30 08:07:38 +0200 jsk r270193 : #i99713 - partly done, needs checking 2009-03-27 11:46:19 +0100 jsk r270143 : #i99713 2009-03-27 07:03:47 +0100 jsk r270128 : #i100602 2009-03-27 06:59:28 +0100 jsk r270122 : #i100602 2009-03-26 13:46:17 +0100 jsk r270077 : #i100584 - graphics tests 2009-03-26 13:07:02 +0100 jsk r270073 : #i100584 - hToolsOptions()/framework tools 2009-03-26 12:09:37 +0100 jsk r270065 : #i100581 - Fix outdated gApplication names in config files
Diffstat (limited to 'testautomation/graphics/optional/includes/global/g_paragraph.inc')
-rwxr-xr-xtestautomation/graphics/optional/includes/global/g_paragraph.inc321
1 files changed, 155 insertions, 166 deletions
diff --git a/testautomation/graphics/optional/includes/global/g_paragraph.inc b/testautomation/graphics/optional/includes/global/g_paragraph.inc
index 2d1e5ea449f7..63a83ae0829f 100755
--- a/testautomation/graphics/optional/includes/global/g_paragraph.inc
+++ b/testautomation/graphics/optional/includes/global/g_paragraph.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-'*
+'*
'* Copyright 2008 by Sun Microsystems, Inc.
'*
'* OpenOffice.org - a multi-platform office productivity suite
@@ -35,118 +35,107 @@
'*
'* short description :
'*
-'***********************************************************************************
-'*
-' #1 tdFormatParagraph
-'*
'\***********************************************************************************
testcase tdFormatParagraph
- Dim Zaehler as integer
- Dim a as integer
- dim iCount as integer '3 out of 6 have to be able to change a value!
- dim sIndent as string
- dim sIndentValue
- dim sTemp(5) as string
- dim iTemp as integer
- dim sApplication as string
-
- if (gApplication = "DRAW") then
- sApplication = "DRAWING"
- else
- sApplication = "IMPRESS"
- endif
+ Dim Zaehler as integer
+ Dim a as integer
+ dim iCount as integer '3 out of 6 have to be able to change a value!
+ dim sIndent as string
+ dim sIndentValue
+ dim sTemp(5) as string
+ dim iTemp as integer
- iCount = 0
- '/// open application ///'
- Call hNewDocument
+ iCount = 0
+ '/// open application ///'
+ Call hNewDocument
- printlog "'/// - save states ///" '
- ToolsOptions
- hToolsOptions (sApplication,"General")
+ printlog "'/// - save states ///" '
+ ToolsOptions
+ hToolsOptions (gApplication,"General")
iTemp = Masseinheit.GetSelIndex
Masseinheit.TypeKeys= "<HOME>" '(first entry)
Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
+ ExtrasOptionenDlg.OK
-'/// call Format->Paragraph & set some values on 'indents and spacing' ///'
- FormatParagraph
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Kontext "TabEinzuegeUndAbstaende"
- VonLinks.SetText "2"
- sleep (1)
- VonLinks.Typekeys "<TAB>"
- ErsteZeile.SetText "2"
- sleep (1)
- ErsteZeile.Typekeys "<TAB>"
- VonRechts.SetText "2"
- sleep (1)
- VonRechts.Typekeys "<TAB>"
- Oben.SetText "2"
- sleep (1)
- Oben.Typekeys "<TAB>"
- Unten.SetText "2"
- sleep (1)
- Unten.Typekeys "<TAB>"
- Zeilenabstand.TypeKeys "<DOWN>"
- Zeilenabstand.TypeKeys "<UP>"
- printlog "linespacing count: "+Zeilenabstand.GetItemCount
- sTemp(1) = VonLinks.getText
- sTemp(2) = ErsteZeile.getText
- sTemp(3) = VonRechts.getText
- sTemp(4) = Oben.getText
- sTemp(5) = Unten.getText
- TabEinzuegeUndAbstaende.OK
- '///+ close dialog ///'
- '///+ call Format->Paragraph again and check values ///'
- FormatParagraph
- Kontext
- Active.SetPage TabEinzuegeUndAbstaende
- Kontext "TabEinzuegeUndAbstaende"
- if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'"
- if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'"
- if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'"
- if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'"
- if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'"
+ '/// call Format->Paragraph & set some values on 'indents and spacing' ///'
+ FormatParagraph
+ Kontext
+ Active.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ VonLinks.SetText "2"
+ sleep (1)
+ VonLinks.Typekeys "<TAB>"
+ ErsteZeile.SetText "2"
+ sleep (1)
+ ErsteZeile.Typekeys "<TAB>"
+ VonRechts.SetText "2"
+ sleep (1)
+ VonRechts.Typekeys "<TAB>"
+ Oben.SetText "2"
+ sleep (1)
+ Oben.Typekeys "<TAB>"
+ Unten.SetText "2"
+ sleep (1)
+ Unten.Typekeys "<TAB>"
+ Zeilenabstand.TypeKeys "<DOWN>"
+ Zeilenabstand.TypeKeys "<UP>"
+ printlog "linespacing count: "+Zeilenabstand.GetItemCount
+ sTemp(1) = VonLinks.getText
+ sTemp(2) = ErsteZeile.getText
+ sTemp(3) = VonRechts.getText
+ sTemp(4) = Oben.getText
+ sTemp(5) = Unten.getText
+ TabEinzuegeUndAbstaende.OK
+ '///+ close dialog ///'
+ '///+ call Format->Paragraph again and check values ///'
+ FormatParagraph
+ Kontext
+ Active.SetPage TabEinzuegeUndAbstaende
+ Kontext "TabEinzuegeUndAbstaende"
+ if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'"
+ if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'"
+ if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'"
+ if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'"
+ if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'"
- '///+ try to activate the metric field for line spacing, has to work for the last 3 of 6 entries !///'
- Zaehler=Zeilenabstand.GetItemCount
- for a=1 to Zaehler
+ '///+ try to activate the metric field for line spacing, has to work for the last 3 of 6 entries !///'
+ Zaehler=Zeilenabstand.GetItemCount
+ for a=1 to Zaehler
Zeilenabstand.Select a
sIndent = Zeilenabstand.GetSelText
sleep 1
try
-' if um.IsEnabled then printlog "## UM##"
-' if von.IsEnabled then printlog "##VON##"
- if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-("
- if von.IsEnabled then
- sIndentValue = von.GetText
- von.More
- sleep 1
- if sIndentValue = von.GetText then
- warnlog "value didn't change :-( : '"+sIndent +"'"
- else
- printlog "value changed :-) '"+sIndent +"'"
- endif
- iCount = iCount+1
- else
- if um.IsEnabled then
- sIndentValue = Um.GetText
- Um.More
- sleep 1
- if sIndentValue = Um.GetText then
+ ' if um.IsEnabled then printlog "## UM##"
+ ' if von.IsEnabled then printlog "##VON##"
+ if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-("
+ if von.IsEnabled then
+ sIndentValue = von.GetText
+ von.More
+ sleep 1
+ if sIndentValue = von.GetText then
warnlog "value didn't change :-( : '"+sIndent +"'"
- else
+ else
printlog "value changed :-) '"+sIndent +"'"
- endif
- iCount = iCount+1
- else
- printlog "value not changeable :-? '"+sIndent +"'"
- endif
- endif
+ endif
+ iCount = iCount+1
+ else
+ if um.IsEnabled then
+ sIndentValue = Um.GetText
+ Um.More
+ sleep 1
+ if sIndentValue = Um.GetText then
+ warnlog "value didn't change :-( : '"+sIndent +"'"
+ else
+ printlog "value changed :-) '"+sIndent +"'"
+ endif
+ iCount = iCount+1
+ else
+ printlog "value not changeable :-? '"+sIndent +"'"
+ endif
+ endif
catch
- warnLog "BIGERROR :-("
+ warnLog "BIGERROR :-("
endcatch
printlog "----------------------------------------------------------------------------------------"
sleep 1
@@ -156,85 +145,85 @@ testcase tdFormatParagraph
Kontext
Active.SetPage TabEinzuegeUndAbstaende
Kontext "TabEinzuegeUndAbstaende"
- next a
- if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-("
- TabeinzuegeUndAbstaende.OK
+ next a
+ if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-("
+ TabeinzuegeUndAbstaende.OK
-'/// call Format->Paragraph & set some values on 'alignment' ///'
-'///+ check button, close dialog, open again, check if the button is stioll selected ///'
-'///+ do it for all four buttons: left, right, center, justified ///'
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
+ '/// call Format->Paragraph & set some values on 'alignment' ///'
+ '///+ check button, close dialog, open again, check if the button is stioll selected ///'
+ '///+ do it for all four buttons: left, right, center, justified ///'
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
- Links.Check
- TabAusrichtungAbsatz.OK
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if Links.IsChecked=False Then WarnLog " Button 'left' is not activated"
+ Links.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Links.IsChecked=False Then WarnLog " Button 'left' is not activated"
- Rechts.Check
- TabAusrichtungAbsatz.OK
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated"
+ Rechts.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated"
- Zentriert.Check
- TabAusrichtungAbsatz.OK
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated"
+ Zentriert.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated"
- Blocksatz.Check
- TabAusrichtungAbsatz.OK
- FormatParagraph
- Kontext
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated"
- TabAusrichtungAbsatz.OK
+ Blocksatz.Check
+ TabAusrichtungAbsatz.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated"
+ TabAusrichtungAbsatz.OK
-'/// call Format->Paragraph & set some values on 'tabs' ///'
- FormatParagraph
- Kontext
- Active.SetPage TabTabulator
- Kontext "TabTabulator"
- SetClipboard Position.GetItemCount
- Position.SetText "1"
- Neu.Click
- Position.SetText "2"
- Neu.Click
- Position.SetText "3"
- Neu.Click
- TabTabulator.OK
- FormatParagraph
- Kontext
- Active.SetPage TabTabulator
- Kontext "TabTabulator"
- if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added"
- Loeschen.Click
- if Position.GetItemCount="3" Then
- WarnLog " Delete does not work"
- else
- Printlog " TAll ran well in TabTabulator"
- end if
- TabTabulator.OK
+ '/// call Format->Paragraph & set some values on 'tabs' ///'
+ FormatParagraph
+ Kontext
+ Active.SetPage TabTabulator
+ Kontext "TabTabulator"
+ SetClipboard Position.GetItemCount
+ Position.SetText "1"
+ Neu.Click
+ Position.SetText "2"
+ Neu.Click
+ Position.SetText "3"
+ Neu.Click
+ TabTabulator.OK
+ FormatParagraph
+ Kontext
+ Active.SetPage TabTabulator
+ Kontext "TabTabulator"
+ if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added"
+ Loeschen.Click
+ if Position.GetItemCount="3" Then
+ WarnLog " Delete does not work"
+ else
+ Printlog " TAll ran well in TabTabulator"
+ end if
+ TabTabulator.OK
- printlog "'/// - Reset states back to what they were before ///"'
- ToolsOptions
- hToolsOptions (sApplication,"General")
+ printlog "'/// - Reset states back to what they were before ///"'
+ ToolsOptions
+ hToolsOptions (gApplication,"General")
Masseinheit.Select iTemp
if ( Masseinheit.GetSelIndex <> iTemp ) then WarnLog "Unit of Measurement state were NOT changed back"
Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
+ ExtrasOptionenDlg.OK
- '/// close application ///'
- Call hCloseDocument
+ '/// close application ///'
+ Call hCloseDocument
endcase