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_clipexport.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:39 $
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 : Tests the clipboard-function with a rectangle
38 '*******************************************************************
41 ' #1 MeasurementSetFirst
43 ' #1 SaveMeasurementSetFirst
47 ' #1 tClipboardFromDrawTest
50 ' #1 Small_test_Impress
52 ' #1 Small_test_Writer
55 ' #1 Full_test_Impress
57 ' #1 clear_all_and_close
58 ' #1 Make_LineObject_From_Application
59 ' #1 Make_Rectangle_From_Application
60 ' #1 Make_Make3dObject_From_Application
61 ' #1 Make_TextSquare_From_Application
62 ' #1 Make_And_Check_Formatted_Text_Line_From_Application
63 ' #1 Make_ConnectorObject_From_Application
64 ' #1 Make_Circle_From_Application
65 ' #1 Make_CurveObject_From_Application
66 ' #1 Make_Objectplugin_From_Application
68 '\*******************************************************************
71 global sApplication as string
72 global ReferenceOld as string
73 global ReferenceNew as string
74 global ToApp as string
75 global ToAppCounter as integer
76 global FromApp as string
77 global FromApp2 as string
78 global CheckValue1 as integer
79 global Marker as integer
80 global WindowsSting (4) as string
81 global PositionPositionX as string
82 global PositionPositionY as string
83 global PositionWidth as string
84 global PositionHeight as string
86 global PositionKeepRatio as string
87 global PositionProtectPosition as string
88 global PositionProtectSize as string
89 global PositionFitWidthText as string
90 global PositionFitHeightText as string
91 global PositionAnchorPosition as string
92 global PositionAnchor as string
93 global PositionPositionPosition as string
94 global PositionSizePosition as string
96 global AreaNoFillValue as string
97 global AreaColorValue as string
98 global AreaColourListValue as string
99 global AreaGradientValue as string
100 global AreaGradientListValue as string
101 global AreaAutomaticValue as string
102 global AreaHatchingValue as string
103 global AreaHatchingListValue as string
104 global AreaBackgroundColourValue as string
105 global AreaBackgroundColourListValue as string
106 global AreaIncrementsValue as string
107 global AreaBitmapValue as string
108 global AreaBitmapListValue as string
109 global AreaOriginalListValue as string
110 global AreaRelativeValue as string
111 global AreaWidthValue as string
112 global AreaHeightValue as string
113 global AreaXOffsetValue as string
114 global AreaYOffsetValue as string
115 global AreaTileValue as string
116 global AreaStretchValue as string
117 global AreaRowValue as string
118 global AreaColumnValue as string
119 global AreaOffsetValue as string
121 global ShadowUseShadowsValue as string
122 global ShadowDistanceValue as string
123 global ShadowColorValue as string
124 global ShadowTransparencyValue as string
126 global TransparencyTransparencyValue as string
127 global TransparencyGradientType as string
128 global TransparencyMFZentrumX as string
129 global TransparencyMFZentrumY as string
130 global TransparencyMFWinkel as string
131 global TransparencyMFRand as string
132 global TransparencyMFStartwert as string
133 global TransparencyMFEndwert as string
135 global ColorName as string
136 global ColorColor as string
137 global ColorModel as string
138 global ColorR as string
139 global ColorG as string
140 global ColorB as string
141 global ColorC as string
142 global ColorM as string
143 global ColorY as string
144 global ColorK as string
146 global GradientsType as string
147 global GradientsCenterX as string
148 global GradientsCenterZ as string
149 global GradientsAngle as string
150 global GradientsBorder as string
151 global GradientsFromColor as string
152 global GradientsFromValue as string
153 global GradientsToColor as string
154 global GradientsToValue as string
156 global HatchingDistance as string
157 global HatchingAngle as string
158 global HatchingLineType as string
159 global HatchingLineColor as string
160 global HatchingLineTable as string
162 global BitmapForeground as string
163 global BitmapBackground as string
164 global BitmapTable as string
166 global Text1 as string
167 global Text2 as string
168 global Text3 as integer
169 global Text4 as string
170 global Text5 as string
171 global Text6 as string
172 global Text7 as string
174 '------------------------------- "object"-dependant tests ----------------------
177 call Make_Rectangle_From_Application
179 call Full_test_Impress
180 call Full_test_Writer
183 warnlog "something wrong with testing Rectangle"
187 call Make_Make3dObject_From_Application
189 call Small_test_Impress
191 call Small_test_Writer
193 warnlog "something wrong with testing 3dObject"
196 'qaerrorlog "Make_CurveObject_From_Application needs an overview - FHA"
198 call Make_CurveObject_From_Application
200 call Small_test_Impress
202 call Small_test_Writer
204 warnlog "something wrong with testing CurveObj"
208 call Make_ConnectorObject_From_Application
210 call Small_test_Impress
212 call Small_test_Writer
214 warnlog "something wrong with testing ConnectorObject"
218 call Make_LineObject_From_Application
220 call Small_test_Impress
221 ' call Small_test_Calc
222 ' call Small_test_Writer
224 warnlog "something wrong with testing LineObject"
229 warnlog "something wrong with testing ConnectorObject"
233 call Make_Circle_From_Application
235 call Small_test_Impress
237 call Small_test_Writer
239 warnlog "something wrong with testing Circle"
243 call Make_TextSquare_From_Application
245 call Small_test_Impress
247 call Small_test_Writer
250 warnlog "something wrong with testing TextSquare"
253 call clear_all_and_close
254 Printlog "tClipboardFromDrawTest finished"
258 '------------------------------- Objects ---------------------------------------
259 testcase Make_Make3dObject_From_Application
261 printlog "--- 3D-Object --- from --- " + gApplication
263 call SaveMeasurementSetFirst
267 Call Get_Position_Size_Attributes
268 Call Get_Colour_Attributes
272 '-------------------------------------------------------------------------------
273 testcase Make_Objectplugin_From_Application
276 printlog "--- Objectplugin --- from --- " + gApplication
278 call SaveMeasurementSetFirst
282 call Get_Position_Size_Attributes
283 Call Get_Colour_Attributes
287 '-------------------------------------------------------------------------------
288 testcase Make_TextSquare_From_Application
290 printlog "--------- TextSquare --- from --- " + gApplication
292 call SaveMeasurementSetFirst
296 call Get_Position_Size_Attributes
297 ' Call Get_Colour_Attributes
301 '-------------------------------------------------------------------------------
302 testcase Make_Rectangle_From_Application
304 printlog "--------- Rectangle --- from --- " + gApplication
306 call SaveMeasurementSetFirst
310 call Get_Position_Size_Attributes
311 Call Get_Colour_Attributes
315 '-------------------------------------------------------------------------------
316 testcase Make_Circle_From_Application
318 printlog "--------- Ellipse Object --- from --- " + gApplication
320 call SaveMeasurementSetFirst
324 call Get_Position_Size_Attributes
325 Call Get_Colour_Attributes
329 '-------------------------------------------------------------------------------
330 testcase Make_CurveObject_From_Application
332 printlog "--------- Curve-Object --- from --- " + gApplication
334 call SaveMeasurementSetFirst
338 call Get_Position_Size_Attributes
339 ' Call Get_Colour_Attributes
343 '-------------------------------------------------------------------------------
344 testcase Make_LineObject_From_Application
346 printlog "--------- Line-Object --- from --- " + gApplication
348 call SaveMeasurementSetFirst
352 call Get_Position_Size_Attributes
356 '-------------------------------------------------------------------------------
357 testcase Make_ConnectorObject_From_Application
359 printlog "--------- Connector-Object --- from --- " + gApplication
361 call SaveMeasurementSetFirst
363 Call MakeConnectorObject
365 Call Get_Position_Size_Attributes
366 ' Call Get_Colour_Attributes
370 '-------------------------------------------------------------------------------
371 testcase Make_And_Check_Formatted_Text_Line_From_Application
373 printlog "--------- Formatted Text --- from --- " + gApplication
375 call SaveMeasurementSetFirst
377 Call MakeFormattedTextLine 'inclusive get variable-info.
381 ' Call Check_Text_Formatting
382 ' Call hCloseDocument
384 Call Check_Text_Formatting
388 Call Check_Text_Formatting
391 Call Check_Text_Formatting
395 '--------------------------- Part with the different kinds of tests. -----------
396 testcase Full_test_Draw
399 call MeasurementSetFirst
400 call Check_Position_Size_Attributes
401 call Check_Colors_Borders_Attributes
402 gApplication = FromApp2
406 '-------------------------------------------------------------------------------
407 testcase Small_test_Draw
410 call MeasurementSetFirst
411 call Check_Position_Size_Attributes
412 gApplication = FromApp2
416 '-------------------------------------------------------------------------------
417 testcase Full_test_Impress
420 call MeasurementSetFirst
421 call Check_Position_Size_Attributes
422 call Check_Colors_Borders_Attributes
423 gApplication = FromApp2
427 '-------------------------------------------------------------------------------
428 testcase Small_test_Impress
431 call MeasurementSetFirst
432 call Check_Position_Size_Attributes
433 gApplication = FromApp2
437 '-------------------------------------------------------------------------------
438 testcase Full_test_Calc
441 call MeasurementSetFirst
442 call Check_Position_Size_Attributes
443 call Check_Colors_Borders_Attributes
444 gApplication = FromApp2
448 '-------------------------------------------------------------------------------
449 testcase Small_test_Calc
452 call MeasurementSetFirst
453 call Check_Position_Size_Attributes
454 gApplication = FromApp2
458 '-------------------------------------------------------------------------------
459 testcase Full_test_Writer
462 call MeasurementSetFirst
463 call Check_Position_Size_Attributes
464 call Check_Colors_Borders_Attributes
465 gApplication = FromApp2
469 '-------------------------------------------------------------------------------
470 testcase Small_test_Writer
473 call MeasurementSetFirst
474 call Check_Position_Size_Attributes
475 gApplication = FromApp2
479 '-------------------------------------------------------------------------------
480 testcase clear_all_and_close
483 printlog " --------------------------------------------------------------"
484 printlog " All tests done... clearing up everything and finishing"
485 if gApplication = "WRITER" then
486 DocumentWriter.TypeKeys "<DELETE>"
488 printlog " gApplication is " + gApplication
492 call ResetMeasurement
496 '-------------------------------------------------------------------------------