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: w_fontwork1.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:28:01 $
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 : helge.delfs@sun.com
36 '* short description : Test Format/Fontwork
38 '************************************************************************
47 '\***********************************************************************
53 printLog Chr(13) + "- Test pre-defined shapes (upper/lower Semicircle,...) to the selected text object"
54 '/// Test pre-defined shapes (upper/lower Semicircle,...) to the selected text object
58 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
59 Call wTypeKeys "First Line<Return>"
60 Call wTypeKeys "Second Line<Return>"
61 Call wTypeKeys "Third Line<Return>"
62 Kontext "DocumentWriter"
63 Call wTypeKeys "<ESCAPE>"
73 kreisAuswahl.TypeKeys "<Right>"
80 kreisAuswahl.TypeKeys "<Right>"
84 '/// test Slant Horizontal
85 HorizontalKippen.Click
87 kreisAuswahl.TypeKeys "<Right>"
91 '/// test Slant Vertical
94 kreisAuswahl.TypeKeys "<Right>"
104 '-------------------------------------------------------------------------
110 printLog Chr(13) + "- Test Orientation"
111 '/// Test Orientation
115 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
116 Call wTypeKeys "Test"
117 Kontext "DocumentWriter"
118 Call wTypeKeys "<ESCAPE>"
124 '/// Test Orientation in Rotate
126 kreisAuswahl.TypeKeys "<Right>"
131 '/// Test Orientation in Upright
133 kreisAuswahl.TypeKeys "<Right>"
138 '/// Test Orientation in Horizontal
139 HorizontalKippen.Click
140 kreisAuswahl.TypeKeys "<Right>"
145 '/// Test Orientation in Slant Vertical
147 kreisAuswahl.TypeKeys "<Right>"
158 '-------------------------------------------------------------------------
164 printLog Chr(13) + "- Test Align , include Left , Center, Right and Autosize ."
165 '/// Test Align , include Left , Center, Right and Autosize
169 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
170 Call wTypeKeys "Test"
171 Kontext "DocumentWriter"
172 Call wTypeKeys "<ESCAPE>"
178 '/// Test Align in Rotate
180 kreisAuswahl.TypeKeys "<Right>"
188 '/// Test Align in Upright
190 kreisAuswahl.TypeKeys "<Right>"
198 '/// Test Align in Horizontal
199 HorizontalKippen.Click
200 kreisAuswahl.TypeKeys "<Right>"
208 '/// Test Align in Slant Vertical
210 kreisAuswahl.TypeKeys "<Right>"
224 '-------------------------------------------------------------------------
228 Dim sDistance , sIndent as String
230 sDistance = "1" + gSeperator + "00" + gMeasurementUnit
231 sIndent = "1" + gSeperator + "10" + gMeasurementUnit
233 printLog Chr(13) + "- Test distance and indent"
234 '/// Test distance and indent
238 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
239 Call wTypeKeys "Test"
240 Kontext "DocumentWriter"
241 Call wTypeKeys "<ESCAPE>"
243 '/// format/fontwork , set distance and indent
248 kreisAuswahl.TypeKeys "<Right>"
252 Abstand.SetText sDistance
254 Einzug.SetText sIndent
263 if Left$(Abstand.GetText,4) <> Left$(sDistance,4) then Warnlog "Distance should be "+sDistance+" but -> "+Abstand.GetText
265 if Left$(Einzug.GetText,4) <> Left$(sIndent,4) then Warnlog "Indent should be "+sIndent+" but -> "+Einzug.GetText
273 '-------------------------------------------------------------------------
277 printLog Chr(13) + "- Test Contour - include contour and text contour"
278 '/// Test Contour - include contour and text contour
282 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
283 Call wTypeKeys "Test"
284 Kontext "DocumentWriter"
285 Call wTypeKeys "<ESCAPE>"
292 kreisAuswahl.TypeKeys "<Right>"
294 Buchstabenumrandung.Click
297 Buchstabenumrandung.Click
304 '-------------------------------------------------------------------------
308 Dim sDistanceX , sDistanceY as String
309 Dim sAngle , SPercent as String
310 Dim iVerticalShadowColor , iSlantedShadowColor as Integer
313 case 01 : sAngle = "140" + gSeperator + "0 degrees"
314 case 03 : sAngle = "140" + gSeperator + "0 graus"
315 case 31 : sAngle = "140" + gSeperator + "0graden"
316 case 33 : sAngle = "140" + gSeperator + "0 degrés"
317 case 34 : sAngle = "140" + gSeperator + "0Grados"
318 case 39 : sAngle = "140" + gSeperator + "0gradi"
319 case 46 : sAngle = "140" + gSeperator + "0 grader"
320 case 49 : sAngle = "140" + gSeperator + "0 Grad"
321 case 55 : sAngle = "140" + gSeperator + "0 graus"
322 case 81 : sAngle = "140" + gSeperator + "0度"
323 case 82 : sAngle = "140" + gSeperator + "0 도"
324 case 86 : sAngle = "140" + gSeperator + "0度"
325 case 88 : sAngle = "140" + gSeperator + "0度"
326 case else : QAErrorLog "Now, the test does not support for the language " +iSprache
330 sDistanceX = "1" + gSeperator + "00" + gMeasurementUnit
331 sDistanceY = "1" + gSeperator + "50" + gMeasurementUnit
333 iVerticalShadowColor = 3
334 iSlantedShadowColor = 4
336 printLog Chr(13) + "- Test shadow - include vertical and slanted"
337 '/// Test shadow - include vertical and slanted
341 Call wZeichenobjektEinfuegen("TEXT", 30, 40, 60, 60)
342 Call wTypeKeys "Test"
343 Kontext "DocumentWriter"
344 Call wTypeKeys "<ESCAPE>"
351 kreisAuswahl.TypeKeys "<Right>"
353 Zentriert.Click ' center
359 AbstandX.SetText sDistanceX
361 AbstandY.SetText sDistanceY
363 Schattenfarbe.Select iVerticalShadowColor
371 if AbstandX.GetText <> sDistanceX then Warnlog "Distance X should be "+sDistanceX+" but -> "+AbstandX.GetText
373 if AbstandY.GetText <> sDistanceY then Warnlog "Distance Y should be "+sDistanceY+" but -> "+AbstandY.GetText
375 if Schattenfarbe.GetSelIndex <> iVerticalShadowColor then Warnlog "Vertical shadow color is wrong."
381 printLog "-" + AbstandX.GetText
382 AbstandX.SetText sAngle
384 AbstandY.SetText SPercent
386 Schattenfarbe.Select iSlantedShadowColor
394 if AbstandX.GetText <> sAngle then Warnlog "Distance X should be "+sAngle+" but -> "+AbstandX.GetText
396 if Left$(AbstandY.GetText,3) <> Left$(SPercent,3) then Warnlog "Distance Y should be "+SPercent+" but -> "+AbstandY.GetText
398 if Schattenfarbe.GetSelIndex <> iSlantedShadowColor then Warnlog "Slanted shadow color is wrong."
406 '-------------------------------------------------------------------------