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: wr_o_1.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:32:44 $
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 : Functional-Tests for Tools-Options-Writer -View & Grid
38 '\***********************************************************************
41 printLog Chr(13) + "--------- Options - Tools Writer - ----------"
43 Call tToolsOptionsWriterView1
44 Call tToolsOptionsWriterView2
45 Call tToolsOptionsWriterView3
46 Call tToolsOptionsWriterView4
47 Call tToolsOptionsWriterView5
48 Call tToolsOptionsWriterView6
49 Call tToolsOptionsWriterView7
50 Call tToolsOptionsWriterGrid1
51 Call tToolsOptionsWriterGrid2
52 Call tToolsOptionsWriterGrid3
53 Call tToolsOptionsWriterGrid4
57 '------------------------------------------------------------------------------
59 testcase tToolsOptionsWriterView1
60 dim option_value(11) as boolean
61 dim measurement_unit(3) as integer
62 dim iTemp(3) as integer
63 '/// new writerdocument
66 '///- Tools/Options/Writer: View
68 Call hToolsOptions ( "WRITER" , "VIEW" )
70 option_value(1) = Hilfslinien.IsChecked
71 option_value(2) = FarbigeHandles.IsChecked
72 option_value(3) = GrosseHandles.IsChecked
73 option_value(4) = HorizontaleBildlaufleiste.IsChecked
74 option_value(5) = VertikaleBildlaufleiste.IsChecked
75 option_value(10) = Lineal.IsChecked
76 option_value(6) = HorizontalesLineal.IsChecked
77 option_value(7) = VertikalesLineal.IsChecked
78 option_value(8) = WeichesScrollen.IsChecked
80 measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
81 measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
83 '/// - all states inverting
84 if option_value(1) = true then Hilfslinien.UnCheck else Hilfslinien.Check
85 if option_value(2) = true then FarbigeHandles.UnCheck else FarbigeHandles.Check
86 if option_value(3) = true then GrosseHandles.UnCheck else GrosseHandles.Check
87 if option_value(4) = true then HorizontaleBildlaufleiste.UnCheck else HorizontaleBildlaufleiste.Check
88 if option_value(5) = true then VertikaleBildlaufleiste.UnCheck else VertikaleBildlaufleiste.Check
89 ' has to be checked to enable Horizontal and Vertical Ruler
90 if option_value(10) = true then Lineal.UnCheck else Lineal.Check
91 if Lineal.IsChecked = true then
92 if option_value(6) = true then HorizontalesLineal.UnCheck else HorizontalesLineal.Check
93 if option_value(7) = true then VertikalesLineal.UnCheck else VertikalesLineal.Check
94 if ( HorizontalesLinealMasseinheit.GetItemCount <> measurement_unit(2) ) then
95 HorizontalesLinealMasseinheit.Select (HorizontalesLinealMasseinheit.GetItemCount)
97 HorizontalesLinealMasseinheit.Select (1)
99 if ( VertikalesLinealMasseinheit.GetItemCount <> measurement_unit(3) ) then
100 VertikalesLinealMasseinheit.Select (VertikalesLinealMasseinheit.GetItemCount)
102 VertikalesLinealMasseinheit.Select (1)
104 iTemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
105 iTemp(3) = VertikalesLinealMasseinheit.GetSelIndex
106 '/// if Asian Language enabled there has to be a checkbox 'Right-aligned' for 'Vertical-Ruler' ///
107 if bAsianLan=true and VertikalesLineal.IsChecked = true then
108 if RechtsAusgerichtet.IsVisible = true then
109 if option_value(9)= true then
110 RechtsAusgerichtet.Uncheck
112 RechtsAusgerichtet.Check
115 Warnlog "- Checkbox 'Right-aligned' is not visible !"
119 if option_value(8)= true then WeichesScrollen.UnCheck else WeichesScrollen.Check
121 '/// close options dialog
122 Kontext "ExtrasOptionenDlg"
125 '/// - SO quit - restart
127 '///- Tools/Options/Writer: View
128 '/// - checking states
130 Call hToolsOptions ( "WRITER" , "VIEW" )
131 if ( option_value(1) = Hilfslinien.IsChecked ) then WarnLog "Hilfslinien state changed"
132 if ( option_value(2) = FarbigeHandles.IsChecked ) then WarnLog "FarbigeHandles state changed"
133 if ( option_value(3) = GrosseHandles.IsChecked ) then WarnLog "GrosseHandles state changed"
134 if ( option_value(4) = HorizontaleBildlaufleiste.IsChecked ) then WarnLog "HorizontaleBildlaufleiste state changed"
135 if ( option_value(5) = VertikaleBildlaufleiste.IsChecked ) then WarnLog "VertikaleBildlaufleiste state changed"
136 if ( option_value(8) = WeichesScrollen.IsChecked ) then WarnLog "WeichesScrollen state changed"
137 if ( option_value(10) = Lineal.IsChecked ) then
138 WarnLog "Ruler state changed"
139 if ( option_value(6) = HorizontalesLineal.IsChecked ) then WarnLog "HorizontalesLineal state changed"
140 if ( option_value(7) = VertikalesLineal.IsChecked ) then WarnLog "VertikalesLineal state changed"
141 if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) then WarnLog "HorizontalesLinealMasseinheit state changed"
142 if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) then WarnLog "VertikalesLinealMasseinheit state changed"
144 if bAsianLan=true and VertikalesLineal.IsChecked = true then
145 if RechtsAusgerichtet.IsVisible = true then
146 if option_value(9) = RechtsAusgerichtet.IsChecked then WarnLog "Right-aligned state changed"
148 Warnlog "- Checkbox 'Right-aligned' is not visible !"
153 Kontext "ExtrasOptionenDlg"
155 '/// restore default values
156 Call wOptionsUndo( "All" )
159 Do Until GetDocumentCount = 0
164 '------------------------------------------------------------------------------
166 testcase tToolsOptionsWriterView2
167 dim option_value(11) as boolean
168 dim measurement_unit(3) as integer
169 dim iTemp(3) as integer
170 '/// new writerdocument
173 '///- Tools/Options/Writer: View
175 Call hToolsOptions ( "WRITER" , "VIEW" )
177 '/// remember settings
178 option_value(1) = Hilfslinien.IsChecked
179 option_value(2) = FarbigeHandles.IsChecked
180 option_value(3) = GrosseHandles.IsChecked
181 option_value(4) = HorizontaleBildlaufleiste.IsChecked
182 option_value(5) = VertikaleBildlaufleiste.IsChecked
183 option_value(10) = Lineal.IsChecked
184 option_value(6) = HorizontalesLineal.IsChecked
185 option_value(7) = VertikalesLineal.IsChecked
186 option_value(8) = WeichesScrollen.IsChecked
188 measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
189 measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
191 '/// - uncheck all checkboxes
193 FarbigeHandles.UnCheck
194 GrosseHandles.UnCheck
196 HorizontaleBildlaufleiste.UnCheck
197 VertikaleBildlaufleiste.UnCheck
199 HorizontalesLineal.UnCheck
200 if bAsianLan = true then
201 VertikalesLineal.Check
202 RechtsAusgerichtet.Uncheck
204 VertikalesLineal.Uncheck
205 HorizontalesLinealMasseinheit.Select (1)
206 VertikalesLinealMasseinheit.Select (1)
208 WeichesScrollen.Uncheck
210 '/// close options-dialog
211 Kontext "ExtrasOptionenDlg"
214 '/// check if ViewRuler is disabled
218 Warnlog "View / Ruler should be disabled !"
222 '/// - SO quit - restart
224 '///- Tools/Options/Writer: View
225 '/// - checking states
227 Call hToolsOptions ( "WRITER" , "VIEW" )
228 if Hilfslinien.IsChecked = true then WarnLog "Hilfslinien x"
229 if FarbigeHandles.IsChecked = true then WarnLog "FarbigeHandles x"
230 if GrosseHandles.IsChecked = true then WarnLog "GrosseHandles x"
232 if HorizontaleBildlaufleiste.IsChecked = true then WarnLog "HorizontaleBildlaufleiste x"
233 if VertikaleBildlaufleiste.IsChecked = true then WarnLog "VertikaleBildlaufleiste x"
234 if HorizontalesLineal.IsChecked = true then WarnLog "HorizontalesLineal x/ ViewRuler"
235 if VertikalesLineal.IsChecked = true then WarnLog "VertikalesLineal x"
236 if WeichesScrollen.IsChecked = true then WarnLog "WeichesScrollen x"
237 if bAsianLan=true then
238 if RechtsAusgerichtet.IsVisible = true then
239 if RechtsAusgerichtet.IsEnabled = true then WarnLog "Right-aligned checkbox is enabled"
241 Warnlog "- Checkbox 'Right-aligned' is not visible !"
245 if ( HorizontalesLinealMasseinheit.GetSelIndex <> 1 ) then WarnLog "HorizontalesLinealMasseinheit is not item 1"
246 if ( VertikalesLinealMasseinheit.GetSelIndex <> 1 ) then WarnLog "VertikalesLinealMasseinheit is not item 1"
248 Kontext "ExtrasOptionenDlg"
250 '/// restore default values
251 Call wOptionsUndo( "All" )
253 '/// close writer document
254 Do Until GetDocumentCount = 0
259 '------------------------------------------------------------------------------
261 testcase tToolsOptionsWriterView3
262 dim option_value(11) as boolean
263 dim measurement_unit(3) as integer
264 dim iTemp(3) as integer
266 '/// new writer document
269 '///- Tools/Options/Writer: View
271 Call hToolsOptions ( "WRITER" , "VIEW" )
273 '/// remember all settings
274 option_value(1) = Hilfslinien.IsChecked
275 option_value(2) = FarbigeHandles.IsChecked
276 option_value(3) = GrosseHandles.IsChecked
277 option_value(4) = HorizontaleBildlaufleiste.IsChecked
278 option_value(5) = VertikaleBildlaufleiste.IsChecked
279 option_value(10) = Lineal.IsChecked
280 option_value(6) = HorizontalesLineal.IsChecked
281 option_value(7) = VertikalesLineal.IsChecked
282 option_value(8) = WeichesScrollen.IsChecked
284 measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
285 measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
287 '/// - check all checkboxes
292 HorizontaleBildlaufleiste.Check
293 VertikaleBildlaufleiste.Check
294 HorizontalesLineal.Check
295 VertikalesLineal.Check
296 WeichesScrollen.Check
298 HorizontalesLinealMasseinheit.Select (2)
299 VertikalesLinealMasseinheit.Select (2)
300 itemp(2) = HorizontalesLinealMasseinheit.GetSelIndex
301 itemp(3) = VertikalesLinealMasseinheit.GetSelIndex
303 '/// close options dialog
304 Kontext "ExtrasOptionenDlg"
310 '/// - SO quit - restart
312 '///- Tools/Options/Writer: View
314 Call hToolsOptions ( "WRITER" , "VIEW" )
316 '/// - check if all checked
317 if Hilfslinien.IsChecked = false then WarnLog "Hilfslinien o"
318 if FarbigeHandles.IsChecked = false then WarnLog "FarbigeHandles o"
319 if GrosseHandles.IsChecked = false then WarnLog "GrosseHandles o"
321 if HorizontaleBildlaufleiste.IsChecked = false then WarnLog "HorizontaleBildlaufleiste o"
322 if VertikaleBildlaufleiste.IsChecked = false then WarnLog "VertikaleBildlaufleiste o"
323 if HorizontalesLineal.IsChecked = false then WarnLog "HorizontalesLineal o/ ViewRuler"
324 if VertikalesLineal.IsChecked = false then WarnLog "VertikalesLineal o"
325 if WeichesScrollen.IsChecked = false then WarnLog "WeichesScrollen o"
327 if ( HorizontalesLinealMasseinheit.GetSelIndex <> iTemp(2) ) then WarnLog "HorizontalesLinealMasseinheit is not item " + iTemp(2) + " it's: " + HorizontalesLinealMasseinheit.GetSelIndex
328 if ( VertikalesLinealMasseinheit.GetSelIndex <> iTemp(3) ) then WarnLog "VertikalesLinealMasseinheit is not item " + iTemp(3) + " it's: " + VertikalesLinealMasseinheit.GetSelIndex
330 Kontext "ExtrasOptionenDlg"
332 '/// restore default values
333 Call wOptionsUndo( "All" )
336 Do Until GetDocumentCount = 0
341 '------------------------------------------------------------------------------
343 testcase tToolsOptionsWriterView4
344 dim option_value(11) as boolean
345 dim measurement_unit(3) as integer
346 dim iTemp(3) as integer
347 '/// new writer document
348 printlog "- new writer document"
351 '///- Tools/Options/Writer: View
353 Call hToolsOptions ( "WRITER" , "VIEW" )
355 '/// remember all values
356 printlog "- remember all values"
357 option_value(1) = Hilfslinien.IsChecked
358 option_value(2) = FarbigeHandles.IsChecked
359 option_value(3) = GrosseHandles.IsChecked
360 option_value(4) = HorizontaleBildlaufleiste.IsChecked
361 option_value(5) = VertikaleBildlaufleiste.IsChecked
362 option_value(10) = Lineal.IsChecked
363 option_value(6) = HorizontalesLineal.IsChecked
364 option_value(7) = VertikalesLineal.IsChecked
365 option_value(8) = WeichesScrollen.IsChecked
367 measurement_unit(2) = HorizontalesLinealMasseinheit.GetSelIndex
368 measurement_unit(3) = VertikalesLinealMasseinheit.GetSelIndex
370 '/// close options dialog
371 printlog "- close options dialog"
372 Kontext "ExtrasOptionenDlg"
376 printlog "- insert a table"
378 Kontext "TabelleEinfuegenWriter"
379 TabelleEinfuegenWriter.OK
381 '/// changing linewidth to 0
382 printlog "- changing linewidth to 0"
385 active.SetPage TabUmrandung
386 Kontext "TabUmrandung"
391 '/// insert a graphic
392 printlog "- insert a graphic"
393 Kontext "DocumentWriter"
394 DocumentWriter.TypeKeys "<down>"
395 DocumentWriter.TypeKeys "<down>"
397 Call hGrafikEinfuegen ( gTesttoolPath + "writer\optional\input\options\ga000907.gif" )
401 Call hToolsOptions ( "WRITER" , "VIEW" )
403 '///' Hilfslinien.Check only, when graphic's in motion! ///'
404 printlog "- check values"
407 Kontext "ExtrasOptionenDlg"
411 Call hToolsOptions ( "WRITER" , "VIEW" )
412 printlog "- uncheck values"
413 FarbigeHandles.UnCheck
414 GrosseHandles.UnCheck
416 Kontext "ExtrasOptionenDlg"
418 '/// restore default values
419 printlog "- set defaultsvalues in options"
420 Call wOptionsUndo( "All" )
423 Do Until GetDocumentCount = 0
428 '------------------------------------------------------------------------------
430 testcase tToolsOptionsWriterView5
431 dim option_value(17) as boolean
434 '/// open document: writer\\optional\\input\\options\\options1.sxw
435 Call hFileOpen ( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
436 Call sMakeReadOnlyDocumentEditable
437 '///- Tools/Options/Writer: View
439 printlog ("'/// - save states ///")
441 Call hToolsOptions ("WRITER","VIEW")
443 option_value(1) = GrafikenUndObjekte.IsChecked
444 option_value(2) = Tabellen.IsChecked
445 option_value(3) = Zeichnungen.IsChecked
446 option_value(4) = Feldname.IsChecked
447 option_value(5) = Notizen.IsChecked
449 printlog ("'/// - all states inverting ///")
451 if option_value(1) then GrafikenUndObjekte.UnCheck else GrafikenUndObjekte.Check
452 if option_value(2) then Tabellen.UnCheck else Tabellen.Check
453 if option_value(3) then Zeichnungen.UnCheck else Zeichnungen.Check
454 if option_value(4) then Feldname.UnCheck else Feldname.Check
455 if option_value(5) then Notizen.UnCheck else Notizen.Check
457 Kontext "ExtrasOptionenDlg"
460 printlog ("'/// - SO quit - start ///")
464 printlog ("'/// - checking states ///")
466 Call hToolsOptions ( "WRITER" , "VIEW" )
468 if ( option_value(1) = GrafikenUndObjekte.IsChecked ) then WarnLog "GrafikenUndObjekte state changed"
469 if ( option_value(2) = Tabellen.IsChecked ) then WarnLog "Tabellen state changed"
470 if ( option_value(3) = Zeichnungen.IsChecked ) then WarnLog "Zeichnungen state changed"
471 if ( option_value(4) = Feldname.IsChecked ) then WarnLog "Feldname state changed"
472 if ( option_value(5) = Notizen.IsChecked ) then WarnLog "Notizen state changed"
474 Kontext "ExtrasOptionenDlg"
476 '/// restore default values
477 printlog "- set defaultsvalues in options"
478 Call wOptionsUndo( "All" )
481 Do Until GetDocumentCount = 0
486 '------------------------------------------------------------------------------
488 testcase tToolsOptionsWriterView6
489 dim option_value(17) as boolean
492 '/// open document: writer\\optional\\input\\options\\options1.sxw
493 Call hFileOpen ( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
494 Call sMakeReadOnlyDocumentEditable
495 '///- Tools/Options/Writer: View
497 printlog ("'/// - save states ///")
499 Call hToolsOptions ("WRITER","VIEW")
501 option_value(1) = GrafikenUndObjekte.IsChecked
502 option_value(2) = Tabellen.IsChecked
503 option_value(3) = Zeichnungen.IsChecked
504 option_value(4) = Feldname.IsChecked
505 option_value(5) = Notizen.IsChecked
507 printlog ("'/// - all states unchecked ///")
509 GrafikenUndObjekte.UnCheck
515 Kontext "ExtrasOptionenDlg"
518 printlog ("'/// - SO quit - start ///")
522 printlog ("'/// - checking states ///")
524 Call hToolsOptions ( "WRITER" , "VIEW" )
526 if GrafikenUndObjekte.IsChecked then WarnLog "GrafikenUndObjekte x"
527 if Tabellen.IsChecked then WarnLog "Tabellen x"
528 if Zeichnungen.IsChecked then WarnLog "Zeichnungen x"
529 if Feldname.IsChecked then WarnLog "Feldname x"
530 if Notizen.IsChecked then WarnLog "Notizen x"
532 printlog ("'/// - restore states ///")
533 if ( option_value(1) = TRUE ) Then GrafikenUndObjekte.Check Else GrafikenUndObjekte.UnCheck
534 if ( option_value(2) = TRUE ) Then Tabellen.Check Else Tabellen.UnCheck
535 if ( option_value(3) = TRUE ) Then Zeichnungen.Check Else Zeichnungen.UnCheck
536 if ( option_value(4) = TRUE ) Then Feldname.Check Else Feldname.UnCheck
537 if ( option_value(5) = TRUE ) Then Notizen.Check Else Notizen.UnCheck
539 Kontext "ExtrasOptionenDlg"
541 '/// restore default values
542 printlog "- set defaultsvalues in options"
543 Call wOptionsUndo( "All" )
546 Do Until GetDocumentCount = 0
551 '------------------------------------------------------------------------------
553 testcase tToolsOptionsWriterView7
554 dim option_value(17) as boolean
557 '/// open document: writer\\optional\\input\\options\\options1.sxw
558 Call hFileOpen ( gTesttoolPath + "writer\optional\input\options\options1.sxw" )
559 Call sMakeReadOnlyDocumentEditable
560 '///- Tools/Options/Writer: View
562 printlog ("'/// - save states ///")
564 Call hToolsOptions ("WRITER","VIEW")
566 option_value(1) = GrafikenUndObjekte.IsChecked
567 option_value(2) = Tabellen.IsChecked
568 option_value(3) = Zeichnungen.IsChecked
569 option_value(4) = Feldname.IsChecked
570 option_value(5) = Notizen.IsChecked
572 printlog ("'/// - all Check -> x ///")
574 GrafikenUndObjekte.Check
580 Kontext "ExtrasOptionenDlg"
583 printlog ("'/// - SO quit - start ///")
587 printlog ("'/// - check if all Checked ///")
589 hToolsOptions ( "WRITER" , "VIEW" )
591 if true <> GrafikenUndObjekte.IsChecked then WarnLog "GrafikenUndObjekte o"
592 if true <> Tabellen.IsChecked then WarnLog "Tabellen."
593 if true <> Zeichnungen.IsChecked then WarnLog "Zeichnungen o"
594 if true <> Feldname.IsChecked then WarnLog "Feldname o"
595 if true <> Notizen.IsChecked then WarnLog "Notizen o"
597 Kontext "ExtrasOptionenDlg"
600 '/// restore default values
601 ' printlog "- set defaultsvalues in options"
602 ' Call wOptionsUndo( "All" )
605 Do Until GetDocumentCount = 0
610 '------------------------------------------------------------------------------
612 testcase tToolsOptionsWriterGrid1
613 dim option_value(3) as boolean
614 dim sMetricField(4) as string ' MetricField
615 dim sTempMetricField(4) as string
617 '/// new writer document
621 '/// Tools/Options/Writer: Grid
622 printlog "- Tools/Options/Writer: Grid"
626 Call hToolsOptions ( "WRITER" , "GRID" )
627 printlog "- remember values"
628 option_value(1) = FangrasterBenutzen.IsChecked
629 option_value(2) = RasterSichtbar.IsChecked
630 option_value(3) = AchsenSynchronisieren.IsChecked
632 sMetricField(1) = RasterAufloesungXAchse.GetText
633 sMetricField(2) = RasterAufloesungYAchse.GetText
634 sMetricField(3) = RasterUnterteilungXAchse.GetText
635 sMetricField(4) = RasterUnterteilungYAchse.GetText
637 '/// - all states inverting
638 printlog "- all states inverting"
640 if option_value(1) then FangrasterBenutzen.UnCheck else FangrasterBenutzen.Check
641 if option_value(2) then RasterSichtbar.UnCheck else RasterSichtbar.Check
642 'if option_value(3) then AchsenSynchronisieren.UnCheck else AchsenSynchronisieren.Check
643 'this CheckBox interacts with the MetricBoxes:
644 AchsenSynchronisieren.UnCheck
646 sTempMetricField(1) = RasterAufloesungXAchse.GetText
647 sTempMetricField(2) = RasterAufloesungYAchse.GetText
648 sTempMetricField(3) = RasterUnterteilungXAchse.GetText
649 sTempMetricField(4) = RasterUnterteilungYAchse.GetText
650 RasterAufloesungXAchse.ToMax
651 RasterAufloesungYAchse.ToMin
652 RasterUnterteilungXAchse.ToMin
653 RasterUnterteilungYAchse.ToMax
654 if ( RasterAufloesungXAchse.GetText = sTempMetricField(1) ) then RasterAufloesungXAchse.ToMin
655 if ( RasterAufloesungYAchse.GetText = sTempMetricField(2) ) then RasterAufloesungYAchse.ToMax
656 if ( RasterUnterteilungXAchse.GetText = sTempMetricField(3) ) then RasterUnterteilungXAchse.ToMax
657 if ( RasterUnterteilungYAchse.GetText = sTempMetricField(4) ) then RasterUnterteilungYAchse.ToMin
658 sTempMetricField(1) = RasterAufloesungXAchse.GetText
659 sTempMetricField(2) = RasterAufloesungYAchse.GetText
660 sTempMetricField(3) = RasterUnterteilungXAchse.GetText
661 sTempMetricField(4) = RasterUnterteilungYAchse.GetText
663 Kontext "ExtrasOptionenDlg"
666 '/// - SO quit - start
667 printlog "'- SO quit - start"
669 '/// - checking states
670 printlog "- checking states"
672 Call hToolsOptions ( "WRITER" , "GRID" )
674 if (option_value(1) = FangrasterBenutzen.IsChecked ) then WarnLog "FangrasterBenutzen state changed BugID: 82944 "
675 if (option_value(2) = RasterSichtbar.IsChecked ) then WarnLog "RasterSichtbar state changed"
676 'if (option_value(3)= AchsenSynchronisieren.IsChecked ) then WarnLog "AchsenSynchronisieren state changed"
677 if ( AchsenSynchronisieren.IsChecked = true ) then WarnLog "AchsenSynchronisieren state changed"
678 if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) then WarnLog "RasterAufloesungXAchse state changed"
679 if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) then WarnLog "RasterAufloesungYAchse state changed"
680 if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) then WarnLog "RasterUnterteilungXAchse state changed"
681 if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) then WarnLog "RasterUnterteilungYAchse state changed"
683 Kontext "ExtrasOptionenDlg"
685 '/// restore default values
686 printlog "- set defaultsvalues in options"
687 Call wOptionsUndo( "Grid" )
690 Do Until GetDocumentCount = 0
695 '------------------------------------------------------------------------------
697 testcase tToolsOptionsWriterGrid2
698 dim option_value(3) as boolean
699 dim sMetricField(4) as string ' MetricField
700 dim sTempMetricField(4) as string
702 '/// new writer document
704 '/// Tools/Options/Writer: Grid
706 Call hToolsOptions ( "WRITER" , "GRID" )
708 '/// remember values set
709 option_value(1) = FangrasterBenutzen.IsChecked
710 option_value(2) = RasterSichtbar.IsChecked
711 option_value(3) = AchsenSynchronisieren.IsChecked
713 sMetricField(1) = RasterAufloesungXAchse.GetText
714 sMetricField(2) = RasterAufloesungYAchse.GetText
715 sMetricField(3) = RasterUnterteilungXAchse.GetText
716 sMetricField(4) = RasterUnterteilungYAchse.GetText
718 printlog "- uncheck all checkboxes and set metric fields to min"
719 '/// - uncheck all checkboxes and set metric fields to min
720 FangrasterBenutzen.UnCheck
721 RasterSichtbar.UnCheck
722 AchsenSynchronisieren.UnCheck
724 RasterAufloesungXAchse.ToMin
725 RasterAufloesungYAchse.ToMin
726 RasterUnterteilungXAchse.ToMin
727 RasterUnterteilungYAchse.ToMin
728 sTempMetricField(1) = RasterAufloesungXAchse.GetText
729 sTempMetricField(2) = RasterAufloesungYAchse.GetText
730 sTempMetricField(3) = RasterUnterteilungXAchse.GetText
731 sTempMetricField(4) = RasterUnterteilungYAchse.GetText
733 RasterAufloesungXAchse.More
734 RasterAufloesungYAchse.More
735 RasterUnterteilungXAchse.More
736 RasterUnterteilungYAchse.More
737 if ( sTempMetricField(1) = RasterAufloesungXAchse.GetText ) then WarnLog "RasterAufloesungXAchse More-Button not working"
738 if ( sTempMetricField(2) = RasterAufloesungYAchse.GetText ) then WarnLog "RasterAufloesungYAchse More-Button not working"
739 if ( sTempMetricField(3) = RasterUnterteilungXAchse.GetText ) then WarnLog "RasterUnterteilungXAchse More-Button not working"
740 if ( sTempMetricField(4) = RasterUnterteilungYAchse.GetText ) then WarnLog "RasterUnterteilungYAchse More-Button not working"
741 sTempMetricField(1) = RasterAufloesungXAchse.GetText
742 sTempMetricField(2) = RasterAufloesungYAchse.GetText
743 sTempMetricField(3) = RasterUnterteilungXAchse.GetText
744 sTempMetricField(4) = RasterUnterteilungYAchse.GetText
746 Kontext "ExtrasOptionenDlg"
750 printlog "- SO quit - start"
754 printlog ("'/// - checking states ///")
756 Call hToolsOptions ( "WRITER" , "GRID" )
758 if FangrasterBenutzen.IsChecked then WarnLog "FangrasterBenutzen x"
759 if RasterSichtbar.IsChecked then WarnLog "RasterSichtbar x"
760 if AchsenSynchronisieren.IsChecked then WarnLog "AchsenSynchronisieren x"
761 if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) then WarnLog "RasterAufloesungXAchse is not min."
762 if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) then WarnLog "RasterAufloesungYAchse is not min."
763 if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) then WarnLog "RasterUnterteilungXAchse is not min."
764 if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) then WarnLog "RasterUnterteilungYAchse is not min."
766 Kontext "ExtrasOptionenDlg"
768 '/// restore default values
769 printlog "- set defaultsvalues in options"
770 Call wOptionsUndo( "Grid" )
773 Do Until GetDocumentCount = 0
778 '------------------------------------------------------------------------------
780 testcase tToolsOptionsWriterGrid3
781 dim option_value(3) as boolean
782 dim sMetricField(4) as string ' MetricField
783 dim sTempMetricField(4) as string
787 printlog "'///- Tools/Options/Writer: Grid ///"
788 '/// Tools/Options/Writer: Grid
789 printlog ("'/// - save states ///")
793 Call hToolsOptions ( "WRITER" , "GRID" )
794 option_value(1) = FangrasterBenutzen.IsChecked
795 option_value(2) = RasterSichtbar.IsChecked
796 option_value(3) = AchsenSynchronisieren.IsChecked
798 sMetricField(1) = RasterAufloesungXAchse.GetText
799 sMetricField(2) = RasterAufloesungYAchse.GetText
800 sMetricField(3) = RasterUnterteilungXAchse.GetText
801 sMetricField(4) = RasterUnterteilungYAchse.GetText
803 printlog "- all Check"
804 '/// check all values
805 FangrasterBenutzen.Check
807 AchsenSynchronisieren.Check
809 '///' Synchronize axes check -------------------- ///'
810 RasterAufloesungXAchse.ToMax
812 sTempMetricField(1) = RasterAufloesungXAchse.GetText
813 if RasterAufloesungYAchse.GetText <> sTempMetricField(1) then Warnlog "Y-axis res. differs from X-axis"
814 RasterUnterteilungXAchse.ToMax
816 sTempMetricField(3) = RasterUnterteilungXAchse.GetText
817 if RasterUnterteilungYAchse.GetText <> sTempMetricField(3) then Warnlog "Y-axis sub. differs from X-axis"
818 sTempMetricField(2) = RasterAufloesungYAchse.GetText
819 sTempMetricField(4) = RasterUnterteilungYAchse.GetText
821 Kontext "ExtrasOptionenDlg"
824 printlog ("'/// - SO quit - start ///")
827 printlog ("'/// - checking states ///")
829 Call hToolsOptions ( "WRITER" , "GRID" )
831 if FangrasterBenutzen.IsChecked = false then WarnLog "FangrasterBenutzen o"
832 if RasterSichtbar.IsChecked = false then WarnLog "RasterSichtbar o"
833 if AchsenSynchronisieren.IsChecked = false then WarnLog "AchsenSynchronisieren o"
834 if ( RasterAufloesungXAchse.GetText <> sTempMetricField(1) ) then WarnLog "RasterAufloesungXAchse is not max.Bug 54934 in 01:"
835 if ( RasterAufloesungYAchse.GetText <> sTempMetricField(2) ) then WarnLog "RasterAufloesungYAchse is not max."
836 if ( RasterUnterteilungXAchse.GetText <> sTempMetricField(3) ) then WarnLog "RasterUnterteilungXAchse is not max."
837 if ( RasterUnterteilungYAchse.GetText <> sTempMetricField(4) ) then WarnLog "RasterUnterteilungYAchse is not max."
839 Kontext "ExtrasOptionenDlg"
841 '/// restore default values
842 printlog "- set defaultsvalues in options"
843 Call wOptionsUndo( "Grid" )
846 Do Until GetDocumentCount = 0
851 '------------------------------------------------------------------------------
853 testcase tToolsOptionsWriterGrid4
854 dim option_value(3) as boolean
855 dim sMetricField(4) as string ' MetricField
856 dim sTempMetricField(4) as string
858 '/// new writer document
862 printlog "'///- Tools/Options/Writer: Grid ///"
864 printlog ("'/// - save states ///")
867 Call hToolsOptions ( "WRITER" , "GRID" )
869 printlog ("'///TabRaster all UnCheck ! ///")
871 option_value(1) = FangrasterBenutzen.IsChecked
872 option_value(2) = RasterSichtbar.IsChecked
873 option_value(3) = AchsenSynchronisieren.IsChecked
875 sMetricField(1) = RasterAufloesungXAchse.GetText
876 sMetricField(2) = RasterAufloesungYAchse.GetText
877 sMetricField(3) = RasterUnterteilungXAchse.GetText
878 sMetricField(4) = RasterUnterteilungYAchse.GetText
880 Kontext "ExtrasOptionenDlg"
881 ExtrasOptionenDlg.Cancel
883 printlog ("'/// Function Test: Grid Resolution ///'")
884 '/// ( gTesttoolPath + "writer\optional\input\options\gridtst.sxw" ) ///'
886 Call hFileOpen ( gTesttoolPath + "writer\optional\input\options\gridtst.sxw", False )
887 Call sMakeReadOnlyDocumentEditable
889 ' select grafik element
890 Call wNavigatorAuswahl(4,1)
892 ' check if @ (0,0) Pineapples ;-)
899 Active.SetPage TabType
902 if ( StrToDouble (HorizontalBy.GetText) <> 0 ) then WarnLog "HorizontalBy wrong presupposition != 0"
903 if ( StrToDouble (VerticalBy.GetText) <> 0 ) then WarnLog "VerticalBy wrong presupposition != 0"
907 ' change Grid Resolution
909 Call hToolsOptions ( "WRITER" , "GRID" )
910 AchsenSynchronisieren.Uncheck
911 RasterAufloesungXAchse.SetText("2")
912 RasterAufloesungYAchse.SetText("3")
913 RasterUnterteilungXAchse.SetText("2")
914 RasterUnterteilungYAchse.SetText("3")
915 Kontext "ExtrasOptionenDlg"
918 '/// move grafik with <Alt> + <up/down> ///'
919 '/// resulting step = 1 Step = 0.10cm ///'
920 Kontext "DocumentWriter"
921 DocumentWriter.TypeKeys "<Mod2 Down>", 45
923 DocumentWriter.TypeKeys "<Mod2 Right>", 45
925 ' check if @ (1,1) Current-Measure-Unit :-)
926 Call wNavigatorAuswahl(4,1)
932 printlog "why is formatgraphics not enabled ????!!! wrong focus??"
935 ' This value depends on the current screensize, so I check only if value have changed!!
936 if ( 0 = StrToDouble (HorizontalBy.GetText)) then WarnLog "RasterAufloesungXAchse has not been changed !"
937 if ( 0 = StrToDouble (VerticalBy.GetText)) then WarnLog "RasterAufloesungYAchse has not been changed!"
943 '/// restore default values
944 printlog "- set defaultsvalues in options"
945 Call wOptionsUndo( "Grid" )
948 Do Until GetDocumentCount = 0
953 '------------------------------------------------------------------------------