merge the formfield patch from ooo-build
[ooovba.git] / testautomation / graphics / optional / includes / global / g_clipexport3.inc
blob0011c5b31d972d8c20e1a464f7b76ed2a8716069
1 'encoding UTF-8  Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '*
5 '* Copyright 2008 by Sun Microsystems, Inc.
6 '*
7 '* OpenOffice.org - a multi-platform office productivity suite
8 '*
9 '* $RCSfile: g_clipexport3.inc,v $
11 '* $Revision: 1.1 $
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 : Procedures for the Clipboard-Export-Test
38 '*******************************************************************
40 ' #1 Get_Position_Size_Attributes       :Getting values from the position and size dialog
41 ' #1 Get_Colour_Attributes              :Geting Attributes from Area Dialog
42 ' #1 Check_Position_Size_Attributes     :Pasting object and comparing attributes with the stored values
43 ' #1 Check_Text_Formatting              :Checking text formatting of pasted object
44 ' #1 Check_Colors_Borders_Attributes    :
45 ' #1 SetKontextApplication              :-
46 ' #1 New_Draw                           :-
47 ' #1 New_Impress                        :-
48 ' #1 New_Calc                           :-
49 ' #1 New_Writer                         :-
50 ' #1 Choose_Toapplication               :-
53 '\*******************************************************************
55 Sub Get_Position_Size_Attributes
57     Printlog "   Get_Position_Size_Attributes Starts"
59     FormatPositionAndSize
61     sleep 1
63     Kontext
64     Select Case gApplication
65     Case "WRITER"  : active.SetPage TabPositionAndSizeWriter
66         Kontext "TabPositionAndSizeWriter"
67     Case else      : active.SetPage TabPositionAndSize
68         Kontext "TabPositionAndSize"
69     End Select
70     sleep 1
72     ' /// Size-values ///'
73     PositionWidth = Width.GetText
74     PositionHeight = Height.GetText
76     if KeepRatio.IsChecked then SetText.PositionKeepRatio = "TRUE"
77         if ProtectPosition.IsChecked then SetText.PositionProtectPosition = "TRUE"
78             if ProtectSize.IsChecked then SetText.PositionProtectSize = "TRUE"
79                 sleep 1
81                 Kontext
82                 Select Case gApplication
83                 Case "WRITER"  : active.SetPage TabPositionAndSizeWriter
84                     Kontext "TabPositionAndSizeWriter"
85                     TabPositionAndSizeWriter.OK
86                 Case else    :   active.SetPage TabPositionAndSize
87                     Kontext "TabPositionAndSize"
88                     TabPositionAndSize.OK
89                 End Select
90                 sleep 1
91                 SetKontextApplication
92                 sleep 3
93                 Printlog "   Get_Position_Size_Attributes Ends"
95 end sub
97 '-------------------------------------------------------------------------------
98 sub Get_Colour_Attributes
100     printlog "   Get_Colour_Attributes Starts"
102     FormatArea
103     Kontext "TabArea"
104     Kontext
105     Active.setpage TabArea
106     Kontext "TabArea"
109     ' /// Area ///'
110     FillOptions.Select 2
111     if FillOptions.GetSelIndex <> 2 then Errorlog "Couldnt click on 'Color' in FormatArea"
112         AreaColourListValue = ColourList.GetSelText
113         printlog "AreaColourListValue = " + AreaColourListValue
114         sleep 1
116         FillOptions.Select 3
117         if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on .Gradient. in FormatArea"
119             AreaGradientListValue = GradientList.GetSelText    'AreaGradientValue = "TRUE"
120             If Automatic.IsVisible then
121                 If Automatic.IsChecked then AreaAutomaticValue = "TRUE"
122                 Else
123                     If Increments.IsVisible then
124                         AreaIncrementsValue = Increments.GetText
125                     End if
126                 End if
128                 FillOptions.Select 4
129                 if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea"
131                     AreaHatchingListValue = HatchingList.GetSelText 'Then  = "TRUE"  ' lista
132                     If BackgroundColour.IsVisible then
133                         If BackgroundColour.IsChecked then
134                             AreaBackgroundColourValue = BackgroundColour.GetText
135                         End if
136                     End if
137                     If BackgroundColourList.IsVisible then
138                         AreaBackgroundColourListValue = BackgroundColourList.GetSelText
139                     End if
141                     FillOptions.Select 5
142                     if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Hatching' in FormatArea"
144                         AreaBitmapListValue = BitmapList.GetSelText
146                         If Original.IsChecked then
147                             AreaOriginalListValue = "TRUE"
148                         Else
149                             If Relative.IsChecked then
150                                 AreaRelativeValue = "TRUE"
151                                 AreaWidthValue = Width.GetText
152                                 AreaHeightValue = Height.GetText
153                             Else
154                                 AreaWidthValue = Width.GetText
155                                 AreaHeightValue = Height.GetText
156                             End if
157                         End if
159                         If Tile.IsChecked then AreaTileValue = "TRUE"
160                             If Stretch.IsChecked then AreaStretchValue = "TRUE"
161                                 If Row.IsChecked then
162                                     AreaRowValue = "TRUE"
163                                     AreaOffsetValue = Offset.GetText
164                                 End if
165                                 If Column.IsChecked then
166                                     AreaColumnValue = "TRUE"
167                                     AreaOffsetValue = Offset.GetText
168                                 End if
170                                 sleep 1
173                                 Kontext "TabArea"
174                                 Kontext
175                                 Active.setpage TabSchatten
176                                 Kontext "TabSchatten"
178                                 If Anzeigen.IsChecked then
179                                     ShadowUseShadowsValue = "TRUE"
180                                     ShadowDistanceValue = Entfernung.GetText
181                                     ShadowColorValue = Farbe.GetText
182                                     ShadowTransparencyValue = Transparenz.GetText
183                                 end if
185                                 sleep 1
188                                 Kontext
189                                 Active.SetPage TabTransparenz
190                                 Kontext "TabTransparenz"
191                                 if KeineTransparenz.IsEnabled = FALSE then
192                                     warnlog "   Couldnt check 'No transparency' in Area - Transparency'"
193                                 else
194                                     KeineTransparenz.Check
195                                 end if
197                                 If KeineTransparenz.IsChecked then LineareTransparenz.Check
198                                     If LineareTransparenz.IsChecked then
199                                         TransparencyTransparencyValue = MFLinTransparenz.GetText
200                                     End if
203                                     Transparenzverlauf.Check
204                                     If Transparenzverlauf.IsChecked then
205                                         TransparencyGradientType = TransparenzverlaufTyp.GetItemText
206                                         TransparencyMFZentrumX = MFZentrumX.GetText
207                                         TransparencyMFZentrumY = MFZentrumY.GetText
208                                         TransparencyMFWinkel = MFWinkel.GetText
209                                         TransparencyMFRand = MFRand.GetText
210                                         TransparencyMFStartwert = MFStartwert.GetText
211                                         TransparencyMFEndwert = MFEndwert.GetText
212                                     End if
214                                     sleep 1
217                                     Kontext
218                                     Active.setpage TabFarben
219                                     Kontext "TabFarben"
221                                     ColorName = FarbName.GetText
222                                     ColorColor = Farbe.GetItemText
223                                     ColorModel = Farbmodell.GetSelText
224                                     printlog "   The colormodel is: " + ColorModel
226                                     if ColorModel = "RGB" then
227                                         ColorR = R.GetText
228                                         ColorG = G.GetText
229                                         ColorB = B.GetText
230                                     elseif ColorModel = "RVB" then
231                                         ColorR = R.GetText
232                                         ColorG = G.GetText
233                                         ColorB = B.GetText
234                                     else
235                                         ColorC = C.GetText
236                                         ColorM = M.GetText
237                                         ColorY = Y.GetText
238                                         ColorK = K.GetText
239                                     endif
241                                     Kontext
242                                     Active.setpage TabFarbverlaeufe
243                                     Kontext "TabFarbverlaeufe"
245                                     GradientsType = Typ.GetItemText
246                                     GradientsCenterX = ZentrumX.GetText
247                                     GradientsCenterZ = ZentrumY.GetText
248                                     GradientsAngle = Winkel.GetText
249                                     GradientsBorder = Rand.GetText
250                                     GradientsFromColor = Von.GetItemText
251                                     GradientsFromValue = VonWert.GetText
252                                     GradientsToColor = Bis.GetItemText
253                                     GradientsToValue = BisWert.GetText
256                                     Kontext
257                                     Active.setpage TabSchraffuren
258                                     Kontext "TabSchraffuren"
260                                     HatchingDistance = Abstand.GetText
261                                     HatchingAngle = Winkel.GetText
262                                     'Definition
263                                     HatchingLineType = Linientyp.GetSelText
264                                     HatchingLineColor = Linienfarbe.GetSelText
265                                     HatchingLineTable = Tabelle.GetItemText
268                                     Kontext
269                                     Active.setpage TabBitmap
270                                     Kontext "TabBitmap"
272                                     BitmapForeground = Vordergrund.GetSelText
273                                     BitmapBackground = Hintergrund.GetSelText
274                                     BitmapTable = Tabelle.GetSelText
276                                     Kontext
277                                     Active.setpage TabArea
278                                     Kontext "TabArea"
279                                     TabArea.Cancel
280                                     printlog "   Get_Colour_Attributes ends"
282 end sub
284 '-------------------------------------------------------------------------------
285 sub Check_Position_Size_Attributes
287     printlog "   Check_Position_Size_Attributes Starts"
289     sleep 1
290     EditPaste
291     sleep (5)
293     FormatPositionAndSize
295     sleep 1
296     if gApplication = "WRITER" then
297         Kontext "TabPositionAndSizeWriter"
298         Kontext
299         active.SetPage TabPositionAndSizeWriter
300         Kontext
301         active.SetPage TabPositionAndSizeWriter
302         Kontext "TabPositionAndSizeWriter"
303         sleep 1
306         If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: '" + PositionWidth + "'. Possibly caused by i71631."
307             If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: '" + PositionHeight + "'. Possibly caused by i71631."
309                 If PositionKeepRatio = "TRUE" then
310                     If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked"
311                     End if
313                     If PositionProtectPosition = "TRUE" then
314                         If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
315                         End if
317                         If PositionProtectSize = "TRUE" then
318                             If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
319                             End if
320                             sleep 1
322                             Kontext "TabPositionAndSizeWriter"
323                             Kontext
324                             Active.setpage TabPositionAndSizeWriter
325                             Kontext "TabPositionAndSizeWriter"
327                             TabPositionAndSizeWriter.OK
329                         else
330                             Kontext
331                             active.SetPage TabPositionAndSize
332                             Kontext "TabPositionAndSize"
333                             sleep 1
336                             If LiberalMeasurement(PositionWidth, Width.GetText) <> TRUE then QaErrorLog "PositionWidth is: " + Width.GetText + " should be: " + PositionWidth + "'. Possibly caused by i71631."
337                                 If LiberalMeasurement(PositionHeight, Height.GetText) <> TRUE then QaErrorLog "PositionHeight is: " + Height.GetText + " should be: " + PositionHeight + "'. Possibly caused by i71631."
339                                     If PositionKeepRatio = "TRUE" then
340                                         If KeepRatio.IsChecked = "FALSE" then Warnlog "KeepRatio isnt checked"
341                                         End if
343                                         If PositionProtectPosition = "TRUE" then
344                                             If ProtectPosition.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
345                                             End if
347                                             If PositionProtectSize = "TRUE" then
348                                                 If ProtectSize.IsChecked = "FALSE" then Warnlog "ProtectPosition isnt checked"
349                                                 End if
350                                                 sleep 1
352                                                 Kontext "TabPositionAndSize"
353                                                 Kontext
354                                                 Active.setpage TabPositionAndSize
355                                                 Kontext "TabPositionAndSize"
357                                                 TabPositionAndSize.OK
358                                             endif
360                                             SetKontextApplication
361                                             sleep 3
362                                             printlog "   Check_Position_Size_Attributes Ends"
364 end sub
366 '----------------------------------------------------------------------------------------------------
367 sub Check_Text_Formatting
369     printlog "   Check_Text_Formatting Starts"
370     sleep (1)
371     EditPaste
372     sleep (3)
374     select case (gApplication)
375     case "DRAW"    : hTypeKeys "<RETURN>"
376         hTypeKeys "<SHIFT HOME>" 'Mark the whole text'
377     case "IMPRESS" : hTypeKeys "<RETURN>"
378         hTypeKeys "<SHIFT HOME>" 'Mark the whole text'
379     case "WRITER"  : EditSelectAll  'Since there is currently only (should only be) one object (the text) in the document.
380     case "CALC"    : hTypeKeys "<MOD1 HOME>"
381         '                           hTypeKeys "<SHIFT HOME>" 'Mark the whole text'
382     case else      : warnlog "   the test has not been configured for this application ( '" + gApplication + "' ). Please notify testwriter."
383     end select
384     sleep (2)
386     Kontext "TextObjectbar"
387     if TextObjectbar.Exists = FALSE then
388         ViewToolbarsTextFormatting
389         sleep (1)
390     endif
391     Printlog "   - Check if the Fontname is still the same."
392     if Schriftart.GetSelText <> Text1 then warnlog "   Fontname should be: " + Text1 + " but was: " + Schriftart.GetSelText
393         sleep (2)
394         Printlog "   - Check if the Text still has the same Size."
395         if Schriftgroesse.GetSelText <> Text2 then warnlog "   Fontsize should be: " + Text2 + " but was: " + Schriftgroesse.GetSelText
397             Kontext "TextObjectbar"
398             Printlog "   - Check if the Font-attribute is set to Bold."
399             if Fett.GetState(2) <> Text4 then warnlog "   Bold should be: " + Text4 + " but was: " + Fett.GetState(2)
401                 Kontext "TextObjectbar"
402                 Printlog "   - Font attribute cursive"
403                 if Kursiv.GetState(2) <> Text5 then warnlog "   Italic should be: " + Text5 + " but was: " + Kursiv.GetState(2)
405                     Kontext "TextObjectbar"
406                     Printlog "   - Check if the Font-attribute is set to Underlined"
407                     sleep (2)
408                     if Unterstrichen.GetState(2) <> Text6 then warnlog "   Underline should be: " + Text6 + " but was: " + Unterstrichen.GetState(2)
410                         Kontext "TextObjectbar"
411                         if (gApplication) = "CALC" then
412                             kontext "FormatObjectBar"
413                             Printlog "   - Check if the Font-attribute is set to Justified"
414                             if Block.GetState(2) <> Text7 then warnlog "   Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2)
415                             else
416                                 if Blocksatz.GetState(2) <> Text7 then warnlog "   Justified should be: " + Text7 + " but was: " + Blocksatz.GetState(2)
417                                 endif
418                                 SetKontextApplication
419                                 printlog "   Check_Text_Formatting Ends"
422                                 '----------------------------------------------------------------------------------------------------
423 sub Check_Colors_Borders_Attributes
425     printlog "   Check_Colors_Borders_Attributes Starts"
427     FormatArea
429     Kontext "TabArea"
430     Kontext
431     Active.setpage TabArea
432     Kontext "TabArea"
434     ' /// Area ///'
435     FillOptions.Select 2
436     if FillOptions.GetSelIndex <> 2 then Errorlog "Couldnt click on 'Color' in FormatArea"
438         If AreaColourListValue <> ColourList.GetSelText then
439             WarnLog "   Area ColourList doesn't have the right Colour selected."
440             printlog "   AreaColourListValue = " + AreaColourListValue + " should be = " + ColourList.GetSelText
441         end if
443         sleep 1
445         FillOptions.Select 3
446         if FillOptions.GetSelIndex <> 3 then Errorlog "Couldnt click on 'Gradient.' in FormatArea"
448             If AreaGradientListValue <> GradientList.GetSelText then WarnLog "Area GradientList has changed it's value."
449                 If Automatic.IsVisible then
450                     If AreaAutomaticValue = "TRUE" then
451                         If Automatic.IsChecked then
452                             Printlog "   Area Automatic Value is correct"
453                         Else
454                             WarnLog "   Area Automatic Value wasnt checked. It should have been."
455                         End if
456                     End if
457                 Else
458                     If Increments.IsVisible then
459                         If AreaIncrementsValue <> Increments.GetText then WarnLog "Area Increments has changed."
460                         End if
461                     End if
463                     FillOptions.Select 4
464                     if FillOptions.GetSelIndex <> 4 then Errorlog "Couldnt click on 'Hatching' in FormatArea"
466                         If AreaHatchingListValue <> HatchingList.GetSelText then Errorlog "Area HatchingList has changed it's value."
467                             If BackgroundColour.IsVisible then
468                                 If BackgroundColour.IsChecked then
469                                     If AreaBackgroundColourValue <> BackgroundColour.GetText then Errorlog "Area Background Color has changed it's value."
470                                     end if
471                                 end if
472                                 If BackgroundColourList.IsVisible then
473                                     If AreaBackgroundColourListValue <> BackgroundColourList.GetSelText then Errorlog "Area Background ColourList has changed it's value."
474                                     End if
476                                     FillOptions.Select 5
477                                     if FillOptions.GetSelIndex <> 5 then Errorlog "Couldnt click on 'Color' in FormatArea"
479                                         If BitmapList.IsVisible then
480                                             If AreaBitmapListValue <> BitmapList.GetSelText then Errorlog "Area Bitmap List has changed it's value."
481                                             else
482                                                 warnlog "   No Area-Bitmap-List visible!"
483                                             end if
484                                             If Original.IsChecked = "TRUE" then
485                                                 If AreaOriginalListValue <> "TRUE" then Errorlog "Original List has changed it's value."
486                                                 Else
487                                                     If Relative.IsChecked = "TRUE" then
488                                                         If AreaRelativeValue <> "TRUE" then Errorlog "Area Relative has changed it's value." = "TRUE"
489                                                             If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed."
490                                                                 If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed."
491                                                                 Else
492                                                                     If AreaWidthValue <> Width.GetText then Errorlog "AreaWidthValue has changed."
493                                                                         If AreaHeightValue <> Height.GetText then Errorlog "AreaHeightValue has changed."
494                                                                         End if
495                                                                     End if
497                                                                     If Tile.IsChecked then
498                                                                         If AreaTileValue <> "TRUE" then Errorlog "AreaTileValue has changed."
499                                                                         End if
501                                                                         If Stretch.IsChecked then
502                                                                             If AreaStretchValue <> "TRUE" then Errorlog "AreaStretchValue has changed."
503                                                                             End if
505                                                                             If Row.IsChecked then
506                                                                                 If AreaRowValue <> "TRUE" then Errorlog "AreRowValue has changed."
507                                                                                     If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed."
508                                                                                     End if
510                                                                                     If Column.IsChecked then
511                                                                                         If AreaColumnValue <> "TRUE" then Errorlog "AreaColumnValue has changed."
512                                                                                             If AreaOffsetValue <> Offset.GetText then Errorlog "AreaOffsetValue has changed."
513                                                                                             End if
515                                                                                             sleep 1
517                                                                                             Kontext "TabArea"
518                                                                                             Kontext
519                                                                                             Active.setpage TabSchatten
520                                                                                             Kontext "TabSchatten"
522                                                                                             If Anzeigen.IsChecked then
523                                                                                                 ShadowUseShadowsValue = "TRUE"
524                                                                                                 ShadowDistanceValue = Entfernung.GetText
525                                                                                                 ShadowColorValue = Farbe.GetText
526                                                                                                 ShadowTransparencyValue = Transparenz.GetText
527                                                                                             end if
529                                                                                             sleep 1
531                                                                                             Kontext
532                                                                                             Active.SetPage TabTransparenz
533                                                                                             Kontext "TabTransparenz"
535                                                                                             if KeineTransparenz.IsEnabled = FALSE then
536                                                                                                 warnlog "   Couldnt check 'No transparency' in Area - Transparency'"
537                                                                                             else
538                                                                                                 KeineTransparenz.Check
539                                                                                             end if
541                                                                                             If KeineTransparenz.IsChecked then LineareTransparenz.Check
542                                                                                                 If LineareTransparenz.IsChecked then
543                                                                                                     TransparencyTransparencyValue = MFLinTransparenz.GetText
544                                                                                                 end if
546                                                                                                 Transparenzverlauf.Check
547                                                                                                 If Transparenzverlauf.IsChecked then
548                                                                                                     TransparencyGradientType = TransparenzverlaufTyp.GetItemText
549                                                                                                     TransparencyMFZentrumX = MFZentrumX.GetText
550                                                                                                     TransparencyMFZentrumY = MFZentrumY.GetText
551                                                                                                     TransparencyMFWinkel = MFWinkel.GetText
552                                                                                                     TransparencyMFRand = MFRand.GetText
553                                                                                                     TransparencyMFStartwert = MFStartwert.GetText
554                                                                                                     TransparencyMFEndwert = MFEndwert.GetText
555                                                                                                 end if
557                                                                                                 sleep 1
559                                                                                                 Kontext
560                                                                                                 Active.setpage TabFarben
561                                                                                                 Kontext "TabFarben"
562                                                                                                 ColorName = FarbName.GetText
563                                                                                                 ColorColor = Farbe.GetItemText
564                                                                                                 ColorModel = Farbmodell.GetSelText
565                                                                                                 printlog "   " + ColorModel
567                                                                                                 select case iSprache      ' Prepared for future language-problematics.
568                                                                                                     if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText
569                                                                                                         if ColorG <> G.GetText then Warnlog "Wrong V-Color. Should be: " + ColorG + " but was: " + G.GetText
570                                                                                                             if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText
571                                                                                                             Else
572                                                                                                                 if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText
573                                                                                                                     if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText
574                                                                                                                         if ColorY <> Y.GetText then Warnlog "Wrong J-Color. Should be: " + ColorY + " but was: " + Y.GetText
575                                                                                                                             if ColorK <> K.GetText then Warnlog "Wrong N-Color. Should be: " + ColorK + " but was: " + K.GetText
576                                                                                                                             End if
577                                                                                                                             if ColorR <> R.GetText then Warnlog "Wrong R-Color. Should be: " + ColorR + " but was: " + R.GetText
578                                                                                                                                 if ColorG <> G.GetText then Warnlog "Wrong G-Color. Should be: " + ColorG + " but was: " + G.GetText
579                                                                                                                                     if ColorB <> B.GetText then Warnlog "Wrong B-Color. Should be: " + ColorB + " but was: " + B.GetText
580                                                                                                                                     Else
581                                                                                                                                         if ColorC <> C.GetText then Warnlog "Wrong C-Color. Should be: " + ColorC + " but was: " + C.GetText
582                                                                                                                                             if ColorM <> M.GetText then Warnlog "Wrong M-Color. Should be: " + ColorM + " but was: " + M.GetText
583                                                                                                                                                 if ColorY <> Y.GetText then Warnlog "Wrong Y-Color. Should be: " + ColorY + " but was: " + Y.GetText
584                                                                                                                                                     if ColorK <> K.GetText then Warnlog "Wrong K-Color. Should be: " + ColorK + " but was: " + K.GetText
585                                                                                                                                                     End if
586                                                                                                                                                 end select
588                                                                                                                                                 Kontext
589                                                                                                                                                 Active.setpage TabFarbverlaeufe
590                                                                                                                                                 Kontext "TabFarbverlaeufe"
592                                                                                                                                                 GradientsType = Typ.GetItemText
593                                                                                                                                                 GradientsCenterX = ZentrumX.GetText
594                                                                                                                                                 GradientsCenterZ = ZentrumY.GetText
595                                                                                                                                                 GradientsAngle = Winkel.GetText
596                                                                                                                                                 GradientsBorder = Rand.GetText
597                                                                                                                                                 GradientsFromColor = Von.GetItemText
598                                                                                                                                                 GradientsFromValue = VonWert.GetText
599                                                                                                                                                 GradientsToColor = Bis.GetItemText
600                                                                                                                                                 GradientsToValue = BisWert.GetText
602                                                                                                                                                 Kontext
603                                                                                                                                                 Active.setpage TabSchraffuren
604                                                                                                                                                 Kontext "TabSchraffuren"
606                                                                                                                                                 HatchingDistance = Abstand.GetText
607                                                                                                                                                 HatchingAngle = Winkel.GetText
608                                                                                                                                                 'Definition
609                                                                                                                                                 HatchingLineType = Linientyp.GetSelText
610                                                                                                                                                 HatchingLineColor = Linienfarbe.GetSelText
611                                                                                                                                                 HatchingLineTable = Tabelle.GetItemText
613                                                                                                                                                 Kontext
614                                                                                                                                                 Active.setpage TabBitmap
615                                                                                                                                                 Kontext "TabBitmap"
617                                                                                                                                                 BitmapForeground = Vordergrund.GetSelText
618                                                                                                                                                 BitmapBackground = Hintergrund.GetSelText
619                                                                                                                                                 BitmapTable = Tabelle.GetSelText
621                                                                                                                                                 Kontext
622                                                                                                                                                 Active.setpage TabArea
623                                                                                                                                                 Kontext "TabArea"
624                                                                                                                                                 TabArea.Cancel
626                                                                                                                                                 SetKontextApplication
628                                                                                                                                                 printlog "Check_Colors_Borders_Attributes Ends"
630                                                                                                                                                 Printlog "End of one application"
633                                                                                                                                                 '---------------------------------- Set the Kontext to the current Application ----------------------------------'
634 sub SetKontextApplication
636     sleep 1
637     Select Case gApplication
638     Case "DRAW"
639         Kontext "DocumentDraw"
640         '         Printlog "gApplication / Kontext is now: DocumentDraw"
641         sleep 1
642     Case "IMPRESS"
643         Kontext "DocumentImpress"
644         '         Printlog "gApplication / Kontext is now: DocumentImpress"
645         sleep 1
646     Case "WRITER"
647         Kontext "DocumentWriter"
648         '         Printlog "gApplication / Kontext is now: DocumentWriter"
649         sleep 1
650     Case "CALC"
651         Kontext "DocumentCalc"
652         '         Printlog "gApplication / Kontext is now: DocumentCalc"
653         sleep 1
654     end select
655     sleep 1
657 end sub
659 '------------------------- Part with "create new windows" ---------------------
660 sub New_Draw
662     gApplication = "DRAW"
663     ToApp = "DRAW"
664     printlog "to app has changed to: " + gApplication
665     Call hNewDocument
666     SetKontextApplication
668 end sub
670 '-------------------------------------------------------------------------------
671 sub New_Impress
673     printlog "Copied object from application: " + FromApp2
674     gApplication = "IMPRESS"
675     ToApp = "IMPRESS"
676     printlog "to app has changed to: " + gApplication
677     Call hNewDocument
678     SetKontextApplication
680 end sub
682 '-------------------------------------------------------------------------------
683 sub New_Calc
685     printlog "Copied object from application: " + FromApp2
686     gApplication = "CALC"
687     ToApp = "CALC"
688     printlog "to app has changed to: " + gApplication
689     Call hNewDocument
690     SetKontextApplication
692 end sub
694 '-------------------------------------------------------------------------------
695 sub New_Writer
697     printlog "Copied object from application: " + FromApp2
698     gApplication = "WRITER"
699     ToApp = "WRITER"
700     printlog "to app has changed to: " + gApplication
701     Call hNewDocument
702     SetKontextApplication
704 end sub
706 '-------------------------------------------------------------------------------
707 sub Choose_Toapplication
709     For ToAppCounter = 1 to 4
711         Select case ToAppCounter
712         case "1"   :   Call hCloseDocument
713             printlog "to app: " + gApplication  ' Since the first application is Draw by default, we'll skip that one.
714             ToApp = "DRAW"
715         case "2"   :   Call hCloseDocument
716             gApplication = "IMPRESS"
717             printlog "to app: " + gApplication
718             ToApp = "IMPRESS"
719         case "3"   :   Call hCloseDocument
720             gApplication = "CALC"
721             printlog "to app: " + gApplication
722             ToApp = "CALC"
723         case "4"   :   Call hCloseDocument
724             gApplication = "WRITER"
725             printlog "to app: " + gApplication
726             ToApp = "WRITER"
727         case else  :   goto endsub
728         End select
729     next ToAppCounter
730     Call hNewDocument
731     SetKontextApplication
733 end sub
735 '--------------------------------------------------------------------------------------------------------