1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: g_paragraph.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* Owner : wolfram.garten@sun.com
36 '* short description :
38 '\***********************************************************************************
40 testcase tdFormatParagraph
41 Dim Zaehler as integer
43 dim iCount as integer '3 out of 6 have to be able to change a value!
46 dim sTemp(5) as string
53 hToolsOptions (gApplication,"General")
54 iTemp = Masseinheit.GetSelIndex
55 Masseinheit.TypeKeys= "<HOME>" '(first entry)
56 Kontext "ExtrasOptionenDlg"
61 Active.SetPage TabEinzuegeUndAbstaende
62 Kontext "TabEinzuegeUndAbstaende"
65 VonLinks.Typekeys "<TAB>"
66 ErsteZeile.SetText "2"
68 ErsteZeile.Typekeys "<TAB>"
71 VonRechts.Typekeys "<TAB>"
77 Unten.Typekeys "<TAB>"
78 Zeilenabstand.TypeKeys "<DOWN>"
79 Zeilenabstand.TypeKeys "<UP>"
80 printlog "linespacing count: "+Zeilenabstand.GetItemCount
81 sTemp(1) = VonLinks.getText
82 sTemp(2) = ErsteZeile.getText
83 sTemp(3) = VonRechts.getText
84 sTemp(4) = Oben.getText
85 sTemp(5) = Unten.getText
86 TabEinzuegeUndAbstaende.OK
89 Active.SetPage TabEinzuegeUndAbstaende
90 Kontext "TabEinzuegeUndAbstaende"
91 if LiberalMeasurement(VonLinks.GetText, sTemp(1)) <> TRUE Then WarnLog "Value changed VonLinks is: '" + VonLinks.GetText + "' should: '" + sTemp(1) +"'"
92 if LiberalMeasurement(VonRechts.GetText, sTemp(2)) <> TRUE Then WarnLog "Value changed VonRechts is: '" + VonRechts.GetText + "' should: '" + sTemp(2) +"'"
93 if LiberalMeasurement(ErsteZeile.GetText, sTemp(3)) <> TRUE Then WarnLog "Value changed ErsteZeile is: '" + ErsteZeile.GetText + "' should: '" + sTemp(3) +"'"
94 if LiberalMeasurement(Oben.GetText, sTemp(4)) <> TRUE Then WarnLog "Value changed Oben is: '" + Oben.GetText + "' should: '" + sTemp(4) +"'"
95 if LiberalMeasurement(Unten.GetText, sTemp(5)) <> TRUE Then WarnLog "Value changed Unten is: '" + Unten.GetText + "' should: '" + sTemp(5) +"'"
97 Zaehler=Zeilenabstand.GetItemCount
99 Zeilenabstand.Select a
100 sIndent = Zeilenabstand.GetSelText
103 ' if um.IsEnabled then printlog "## UM##"
104 ' if von.IsEnabled then printlog "##VON##"
105 if (von.IsEnabled and um.IsEnabled) then printlog "##VON#### UM## !!!!! :-("
106 if von.IsEnabled then
107 sIndentValue = von.GetText
110 if sIndentValue = von.GetText then
111 warnlog "value didn't change :-( : '"+sIndent +"'"
113 printlog "value changed :-) '"+sIndent +"'"
118 sIndentValue = Um.GetText
121 if sIndentValue = Um.GetText then
122 warnlog "value didn't change :-( : '"+sIndent +"'"
124 printlog "value changed :-) '"+sIndent +"'"
128 printlog "value not changeable :-? '"+sIndent +"'"
132 warnLog "BIGERROR :-("
134 printlog "----------------------------------------------------------------------------------------"
136 TabEinzuegeUndAbstaende.OK
140 Active.SetPage TabEinzuegeUndAbstaende
141 Kontext "TabEinzuegeUndAbstaende"
143 if iCount <> 3 then warnlog "Could only activate "+ iCount + " out of "+Zaehler +" vlauefields :-("
144 TabeinzuegeUndAbstaende.OK
148 Active.SetPage TabAusrichtungAbsatz
149 Kontext "TabAusrichtungAbsatz"
152 TabAusrichtungAbsatz.OK
155 Active.SetPage TabAusrichtungAbsatz
156 Kontext "TabAusrichtungAbsatz"
157 if Links.IsChecked=False Then WarnLog " Button 'left' is not activated"
160 TabAusrichtungAbsatz.OK
163 Active.SetPage TabAusrichtungAbsatz
164 Kontext "TabAusrichtungAbsatz"
165 if Rechts.IsChecked=False Then WarnLog " Button 'right' is not activated"
168 TabAusrichtungAbsatz.OK
171 Active.SetPage TabAusrichtungAbsatz
172 Kontext "TabAusrichtungAbsatz"
173 if Zentriert.IsChecked=False Then WarnLog " Button 'center' is not activated"
176 TabAusrichtungAbsatz.OK
179 Active.SetPage TabAusrichtungAbsatz
180 Kontext "TabAusrichtungAbsatz"
181 if Blocksatz.IsChecked=False Then WarnLog " Button 'justified' is not activated"
182 TabAusrichtungAbsatz.OK
186 Active.SetPage TabTabulator
187 Kontext "TabTabulator"
188 SetClipboard Position.GetItemCount
198 Active.SetPage TabTabulator
199 Kontext "TabTabulator"
200 if GetClipboardText + 3 = Position.GetItemCount Then PrintLog " positions added"
202 if Position.GetItemCount="3" Then
203 WarnLog " Delete does not work"
205 Printlog " TAll ran well in TabTabulator"
210 hToolsOptions (gApplication,"General")
211 Masseinheit.Select iTemp
212 if ( Masseinheit.GetSelIndex <> iTemp ) then WarnLog "Unit of Measurement state were NOT changed back"
213 Kontext "ExtrasOptionenDlg"