1 '**************************************************************************
2 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '* Copyright 2008 by Sun Microsystems, Inc.
6 '* OpenOffice.org - a multi-platform office productivity suite
8 '* $RCSfile: wr_o_4.inc,v $
12 '* last change: $Author: vg $ $Date: 2008-08-18 12:33:17 $
14 '* This file is part of OpenOffice.org.
16 '* OpenOffice.org is free software: you can redistribute it and/or modify
17 '* it under the terms of the GNU Lesser General Public License version 3
18 '* only, as published by the Free Software Foundation.
20 '* OpenOffice.org is distributed in the hope that it will be useful,
21 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
22 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 '* GNU Lesser General Public License version 3 for more details
24 '* (a copy is included in the LICENSE file that accompanied this code).
26 '* You should have received a copy of the GNU Lesser General Public License
27 '* version 3 along with OpenOffice.org. If not, see
28 '* <http://www.openoffice.org/license.html>
29 '* for a copy of the LGPLv3 License.
31 '/************************************************************************
33 '* owner : helge.delfs@sun.com
35 '* short description :
37 '\***********************************************************************
41 Call tToolsOptionsWriterOther
42 Call tToolsOptionsWriterAutoCaption
43 Call tToolsOptionsWriterGeneral
44 Call tToolsOptionsWriterMailMerge
48 '------------------------------------------------------------------------------
49 testcase tToolsOptionsWriterOther
50 dim irgendwas(7) as boolean ' Checkbox states
51 dim bRadioBut(3) as boolean ' RadioButton states
52 dim bTempRadioBut(3) as boolean
53 dim iMasseinheit as integer
54 dim sTabAbstand as string
61 '-(1) = NurFuerAktuellesDokument
65 '-(4) = FelderUndDiagrammeAktuellesDokument
68 '(6) = AbstaendeSeitenanfang
69 '(7) = TabulatorpositionAusrichten
71 ' bRadioBut(i) and bTempRadioBut(i)
76 ' !!! -Feldbefehle- has to be checked, to get -Diagramme- enabeld !!!
78 '- !!! -Current Document only- ist bei office beenden zu beachten!!!
81 printlog ("'///- Tools/Options/Writer: General ///")
83 printlog ("'/// - save states ///")
85 Call hToolsOptions ("WRITER","GENERAL")
87 irgendwas(2) = Feldbefehle.IsChecked
88 irgendwas(3) = Diagramme.IsChecked
90 bRadioBut(1) = Immer.IsChecked
91 bRadioBut(2) = AufNachfrage.IsChecked
92 bRadioBut(3) = Nie.IsChecked
94 iMasseinheit = Masseinheit.GetSelIndex
95 sTabAbstand = Tabulatorenabstand.GetText
97 printlog ("'/// - all states inverting ///")
99 if irgendwas(2) Then Feldbefehle.UnCheck Else Feldbefehle.Check
100 if Feldbefehle.IsChecked Then if irgendwas(3) Then Diagramme.UnCheck Else Diagramme.Check
102 if (Immer.IsChecked = True) Then AufNachfrage.Check Else Immer.Check
104 bTempRadioBut(1) = Immer.IsChecked
105 bTempRadioBut(2) = AufNachfrage.IsChecked
106 bTempRadioBut(3) = Nie.IsChecked
108 Tabulatorenabstand.ToMax
109 sTemp = Tabulatorenabstand.GetText
110 Tabulatorenabstand.More
112 if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE) Then Warnlog ("BugID: 82740: Tab stops max. isn't max.")
113 Tabulatorenabstand.SetText (sTabAbstand)
115 if ( Masseinheit.GetItemCount <> iMasseinheit ) Then Masseinheit.Select (Masseinheit.GetItemCount) _
116 Else Masseinheit.Select (1)
117 iTemp = Masseinheit.GetSelIndex
119 sTemp = Tabulatorenabstand.GetText
120 Tabulatorenabstand.ToMax
121 if ( Tabulatorenabstand.GetText = sTemp ) Then Tabulatorenabstand.ToMin
122 sTemp = Tabulatorenabstand.GetText
124 Kontext "ExtrasOptionenDlg"
127 printlog ("'/// - SO quit - start ///")
131 printlog ("'/// - checking states ///")
133 Call hToolsOptions ( "WRITER" , "GENERAL" )
135 if ( irgendwas(2) = Feldbefehle.IsChecked ) Then WarnLog "Feldbefehle state changed"
136 if Feldbefehle.IsChecked Then if ( irgendwas(3) = Diagramme.IsChecked ) Then WarnLog "Diagramme state changed"
137 if ( bTempRadioBut(1) <> Immer.IsChecked ) Then WarnLog "Immer state changed"
138 if ( bTempRadioBut(2) <> AufNachfrage.IsChecked) Then WarnLog "AufNachfrage state changed"
139 if ( bTempRadioBut(3) <> Nie.IsChecked ) Then WarnLog "Nie state changed"
141 if ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Masseinheit state changed"
142 if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE ) Then WarnLog "Tabulatorenabstand state changed - watch BugID: 82744 for Status"
144 Kontext "ExtrasOptionenDlg"
147 printlog ("'/// - all UnCheck -> o ///")
149 Call hToolsOptions ( "WRITER" , "GENERAL" )
153 if (AufNachfrage.IsChecked = True) Then Nie.Check Else AufNachfrage.Check
155 bTempRadioBut(1) = Immer.IsChecked
156 bTempRadioBut(2) = AufNachfrage.IsChecked
157 bTempRadioBut(3) = Nie.IsChecked
159 Masseinheit.Select (1)
160 Tabulatorenabstand.ToMin
161 sTemp = Tabulatorenabstand.GetText
162 printlog ("'/// More test ///'")
163 Tabulatorenabstand.More
164 if ( sTemp = Tabulatorenabstand.GetText ) Then WarnLog "Tabulatorenabstand More-Button not working; stemp1: "+sTemp + " =? (2) " +Tabulatorenabstand.GetText
165 sTemp = Tabulatorenabstand.GetText
167 Kontext "ExtrasOptionenDlg"
170 printlog ("'/// - check if all UnChecked ///")
172 Call hToolsOptions ( "WRITER" , "GENERAL" )
174 if Feldbefehle.IsChecked Then WarnLog "Feldbefehle x"
176 if ( bTempRadioBut(1) <> Immer.IsChecked ) Then WarnLog "Immer state changed"
177 if ( bTempRadioBut(2) <> AufNachfrage.IsChecked) Then WarnLog "AufNachfrage state changed"
178 if ( bTempRadioBut(3) <> Nie.IsChecked ) Then WarnLog "Nie state changed"
180 if ( Masseinheit.GetSelIndex <> 1 ) Then WarnLog "Masseinheit is not item 1"
181 sTemp2 = Tabulatorenabstand.GetText
182 if (LiberalMeasurement (sTemp, sTemp2) <> TRUE ) Then WarnLog "Tabulatorenabstand is not min. is: " +Tabulatorenabstand.GetText + " should: " +sTemp
184 Kontext "ExtrasOptionenDlg"
187 '---------------------------------------------------------------------------------
189 printlog ("'/// check if tab stops get saved in document ///")
192 ' set Default Tab Stop to 2,5cm
194 Call hToolsOptions ("WRITER","GENERAL")
195 Masseinheit.Select (2) ' cm
196 ' printlog "before " + Tabulatorenabstand.GetText
197 Tabulatorenabstand.SetText ("2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "50" + mUnit)
198 ' printlog "after " + Tabulatorenabstand.GetText
199 ' printlog "seperator: " + GetDecimalSeperator(Tabulatorenabstand.GetText)
200 ' printlog "generated string: " + "2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "50cm"
201 Kontext "ExtrasOptionenDlg"
204 ' creating document with tabstops and save it
205 Kontext "DocumentWriter"
206 DocumentWriter.TypeKeys "a<Tab>b<Tab>c<Tab>d<Tab>e<Tab>f<Tab>g<Tab>h<Tab>i<Tab>j"
207 Call hFileSaveAsWithFilterKill ( gOfficePath + "user\work\tab25cm.odt", "Writer8")
213 ' set Default Tab Stop to 2,9cm
215 Call hToolsOptions ("WRITER","GENERAL")
216 Masseinheit.Select (2) ' cm
217 ' printlog "before " + Tabulatorenabstand.GetText
218 Tabulatorenabstand.SetText ( "2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "90" + mUnit )
219 ' printlog "after " + Tabulatorenabstand.GetText
220 Kontext "ExtrasOptionenDlg"
224 ' load file in this environment
225 '///use "output\\writer\\w95\\tab25cm.odt" ///
226 Call hFileOpen (gOfficePath + "user\work\tab25cm.odt")
228 ' check TabStops, have to be the ones this file was saved with
230 Call hToolsOptions ("WRITER","GENERAL")
231 Masseinheit.Select (2) ' cm
232 ' printlog "before " + Tabulatorenabstand.GetText
233 if Tabulatorenabstand.GetText <> ("2" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "50" + mUnit) Then
234 warnlog "the tab stops didn't get saved in the document !!!"
235 printlog "should be 2,.50" + mUnit + ", is" + Tabulatorenabstand.GetText
237 Kontext "ExtrasOptionenDlg"
242 '---------------------------------------------------------------------------------
243 Printlog ("'/// - all Check -> x ///")
246 Call hToolsOptions ("WRITER","GENERAL")
248 ' NurFuerAktuellesDokument.Check
251 ' FelderUndDiagrammeAktuellesDokument.Check
253 if (Nie.IsChecked = True) Then Immer.Check Else Nie.Check
255 bTempRadioBut(1) = Immer.IsChecked
256 bTempRadioBut(2) = AufNachfrage.IsChecked
257 bTempRadioBut(3) = Nie.IsChecked
259 Masseinheit.Select (2)
260 itemp = Masseinheit.GetSelIndex
261 sTemp = "3" + GetDecimalSeperator(Tabulatorenabstand.GetText) + "21" + mUnit
262 Tabulatorenabstand.SetText (sTemp)
264 Kontext "ExtrasOptionenDlg"
267 printlog ("'/// - check if all Checked ///")
269 Call hToolsOptions ( "WRITER" , "GENERAL" )
271 ' if not NurFuerAktuellesDokument.IsChecked Then WarnLog "NurFuerAktuellesDokument o"
272 if not Feldbefehle.IsChecked Then WarnLog "Feldbefehle o"
273 if not Diagramme.IsChecked Then WarnLog "Diagramme o"
274 ' if not FelderUndDiagrammeAktuellesDokument.IsChecked Then WarnLog "FelderUndDiagrammeAktuellesDokument o"
276 if ( bTempRadioBut(1) <> Immer.IsChecked ) Then WarnLog "Immer state changed"
277 if ( bTempRadioBut(2) <> AufNachfrage.IsChecked) Then WarnLog "AufNachfrage state changed"
278 if ( bTempRadioBut(3) <> Nie.IsChecked ) Then WarnLog "Nie state changed"
280 if ( Masseinheit.GetSelIndex <> iTemp ) Then WarnLog "Masseinheit is not item " + iTemp + " it's: " + Masseinheit.GetSelIndex
281 if (LiberalMeasurement (sTemp,Tabulatorenabstand.GetText) <> TRUE ) Then WarnLog "Tabulatorenabstand is not " + sTemp + " it's: " + Tabulatorenabstand.GetText
283 printlog ("'/// - restore states ///")
285 ' if ( irgendwas(1) = TRUE ) Then NurFuerAktuellesDokument.Check Else NurFuerAktuellesDokument.UnCheck
286 if ( irgendwas(2) = TRUE ) Then Feldbefehle.Check Else Feldbefehle.UnCheck
287 if ( irgendwas(3) = TRUE ) Then Diagramme.Check Else _
288 if Feldbefehle.IsChecked Then Diagramme.UnCheck
289 ' if Diagramme.IsVisible Then Diagramme.UnCheck
290 ' if ( irgendwas(4) = TRUE ) Then FelderUndDiagrammeAktuellesDokument.Check Else FelderUndDiagrammeAktuellesDokument.UnCheck
292 if ( bRadioBut(1) = TRUE ) Then Immer.Check
293 if ( bRadioBut(2) = TRUE ) Then AufNachfrage.Check
294 if ( bRadioBut(3) = TRUE ) Then Nie.Check
296 Masseinheit.Select (iMasseinheit) 'sw:ListBox:TP_LAYOUT_O
297 Tabulatorenabstand.SetText (sTabAbstand) ' sw:MetricField:TP_LAYOUT_OPT:MF_TAB
299 Kontext "ExtrasOptionenDlg"
302 Do Until GetDocumentCount = 0
307 '------------------------------------------------------------------------------
308 sub hGetAllOptionsWriterGeneralCaption
309 Dim fHoleTabPage as String
310 Dim fHoleTabPage2 as String
311 Dim lsHoleTabPage(100) as String
312 Dim lsHoleTabPage2(100) as String
315 dim y as integer ' for schleifen stuff
317 '/// usually there are 4 entries in the list for Options->Writer->General->Caption->Categorie ///'
318 '///+ if not, this routine is called ///'
319 '///+ The error only appears, if the wrong listItem is not called yet! ///'
324 '/// on error, save before selecting entries to "output\\writer\\opt__" + iSprache + "." + gPlatGroup) ///
325 '/// on error, save entries after selecting all to "output\\writer\\opt2__" + iSprache + "." + gPlatGroup) ///
326 fHoleTabPage = ConvertPath(gOfficePath + "user\work\opt__" + iSprache + "." + gPlatGroup)
327 fHoleTabPage2 = ConvertPath(gOfficePath + "user\work\opt2_" + iSprache + "." + gPlatGroup)
329 '------------------------
330 Printlog "'///(1/3) Get all items before selecting smth. ///"
331 ' put them in lsHoleTabPage and write them to 'user\work\opt__...'
336 Call hToolsOptions ("WRITER","AutoCaption")
337 Kontext "TabAutoCaption"
339 for x=1 to ObjectList.GetItemCount
341 ObjectList.Select (x)
342 ListAppend ( lsHoleTabPage(), ObjectList.GetText + " " + Category.GetItemCount)
343 for y=1 to Category.GetItemCount
346 ListAppend ( lsHoleTabPage(), " " + Category.GetSelText )
350 Kontext "ExtrasOptionenDlg"
353 Call ListWrite(lsHoleTabPage(),fHoleTabPage, "utf8")
354 Printlog "list with all entries written to: "+fHoleTabPage
356 ' ------------------------
358 Printlog "'///(2/3) Select every ListItem & exit with OK ///"
360 Call hToolsOptions ("WRITER","AutoCaption")
361 Kontext "TabAutoCaption"
363 for x=1 to ObjectList.GetItemCount
365 ObjectList.Select (x)
367 while ( i < Category.GetItemCount )
369 Category.Select (i+1)
373 i = Category.GetSelIndex
376 Kontext "TabAutoCaption"
380 Kontext "ExtrasOptionenDlg"
383 '------------------------
384 Printlog "'///(3/3) Get all items after selecting all ///"
385 ' put them in lsHoleTabPage2 and write them to 'user\work\opt2_...'
388 Call hToolsOptions ("WRITER","AutoCaption")
389 Kontext "TabAutoCaption"
390 for x=1 to ObjectList.GetItemCount
392 ObjectList.Select (x)
393 ListAppend ( lsHoleTabPage2(), ObjectList.GetText + " " + Category.GetItemCount)
394 for y=1 to Category.GetItemCount
397 ListAppend ( lsHoleTabPage2(), " " + Category.GetSelText )
401 Call ListWrite(lsHoleTabPage2(),fHoleTabPage2, "utf8")
402 Printlog "list with all entries after selecting every entry written to: "+fHoleTabPage2
406 '------------------------------------------------------------------------------
408 testcase tToolsOptionsWriterAutoCaption
410 '/// look if properties get saved for each list item ///
411 '///+ take "Numbering" ListBox to verify this ///
413 ' checking Listentry '(7) = StarOffice 6.0 Impress' completely
415 dim vObjectList(10) as integer
416 dim vObjectListDescription(10) as string
417 Dim vCategory(10) as integer
418 Dim vCategoryTmp(10) as string
419 Dim vNumbering(10) as integer
420 Dim vCaptionSeparator(10) as string
421 Dim vPosition(10) as integer
422 Dim vLevel(10) as integer
423 Dim vChapterSeparator(10) as string
424 Dim vCharacterStyle(10) as integer
425 Dim vApplyBorderAndShadow(10) as boolean
426 Dim NumberOfObjects as integer
428 dim y as integer ' for schleifen stuff
430 '/// !no more Listentries than 9, you have to update the allocation for the var's! ///'
432 printlog "'///- Tools/Options/Writer: AutoCaption ///"
434 printlog ("'/// - save states ///")
436 Call hToolsOptions ("WRITER","AutoCaption")
437 Kontext "TabAutoCaption"
439 NumberOfObjects = ObjectList.GetItemCount
440 Select Case gPlatGroup
442 if (NumberOfObjects <> 9) then
443 warnlog "Number of Object List is not correct"
446 if (NumberOfObjects <> 8) then
447 warnlog "Number of Object List is not correct"
451 for i=1 to NumberOfObjects
452 ObjectList.Select (i)
453 vObjectList(i) = ObjectList.IsChecked
454 vObjectListDescription(i) = ObjectList.GetText
455 vCategory(i) = Category.GetSelIndex
456 vNumbering(i) = Numbering.GetSelIndex
457 vCaptionSeparator(i) = CaptionSeparator.GetText
458 vPosition(i) = Position.GetSelIndex
459 vLevel(i) = Level.GetSelIndex
460 vChapterSeparator(i) = ChapterSeparator.GetText
461 vCharacterStyle(i) = CharacterStyle.GetSelIndex
462 vApplyBorderAndShadow(i) = ApplyBorderAndShadow.IsChecked
465 '-- just checking the checkboxes of 'ObjectList'
466 printlog ("'/// - uncheck all object - checkboxes ///")
467 for i=1 to NumberOfObjects
468 ObjectList.Select (i)
471 Kontext "ExtrasOptionenDlg"
474 printlog ("'/// - verify if all unchecked and check all ///")
476 Call hToolsOptions ("WRITER","AutoCaption")
477 Kontext "TabAutoCaption"
478 for i=1 to NumberOfObjects
479 ObjectList.Select (i)
480 if ObjectList.IsChecked Then
481 WarnLog ObjectList.GetText & " is checked though it had been unchecked before"
486 Kontext "ExtrasOptionenDlg"
489 printlog ("'/// - verify all checkboxes are checked ///")
491 Call hToolsOptions ("WRITER","AutoCaption")
492 Kontext "TabAutoCaption"
493 for i=1 to NumberOfObjects
494 ObjectList.Select (i)
495 if ( ObjectList.IsChecked = FALSE ) Then
496 WarnLog ObjectList.GetText & " is unchecked though it had been checked before"
501 printlog ("'/// - change states ///")
502 '/// look if properties get saved for each list item
503 for i=1 to NumberOfObjects
504 ObjectList.Select (i)
505 if ObjectList.IsChecked Then
506 if i <= 7 then Numbering.Select i
507 CaptionSeparator.Settext "Caption Separator " & cstr(i)
508 ChapterSeparator.Settext cstr(i)
510 CharacterStyle.Select i
520 ApplyBorderAndShadow.Check
535 if Numbering.GetItemCount > 7 then
536 Numbering.Select Numbering.GetItemCount
543 if Numbering.GetItemCount > 7 then
544 Numbering.Select Numbering.GetItemCount
551 vCategoryTmp(i) = Category.GetSelText
553 Warnlog ObjectList.GetText & " is not checked: Verify test script"
556 Kontext "ExtrasOptionenDlg"
559 printlog ("'/// - SO quit - start ///")
563 printlog ("'/// - checking states ///")
565 Call hToolsOptions ("WRITER","AutoCaption")
566 Kontext "TabAutoCaption"
567 for i=1 to NumberOfObjects
568 printlog "- checking: " & ObjectList.Gettext
569 ObjectList.Select (i)
571 if ObjectList.IsChecked Then
573 if Numbering.GetSelIndex <> i then
574 Warnlog "- 'Numbering' changed after restart"
576 printlog "- 'Numbering' => ok"
579 if CaptionSeparator.Gettext <> "Caption Separator " & cstr(i) then
580 Warnlog "- 'Caption Separator' changed after restart"
582 printlog "- 'Caption Separator' => ok"
584 if ChapterSeparator.Gettext <> cstr(i) then
585 Warnlog "- 'Chapter Separator' changed after restart"
587 printlog "- 'Chapter Separator' => ok"
589 if Level.GetSelIndex <> i then
590 Warnlog "- 'Level' changed after restart"
592 Printlog "- 'Level' => ok"
594 if CharacterStyle.GetSelIndex <> i then
595 Warnlog "- 'Character Style' changed after restart"
597 printlog "- 'Character Style' => ok"
600 if Category.GetSelText <> vCategoryTmp(i) then
601 Warnlog "- 'Category' changed after restart. Not " & vCategoryTmp(i) & " but " & Category.GetSelText
603 printlog "- 'Category' => ok"
608 if Position.GetSelIndex <> 1 then
609 Warnlog "- 'Position' changed after restart"
611 printlog "- 'Position' => ok"
615 if Position.GetSelIndex <> 2 then
616 Warnlog "- 'Position' changed after restart"
618 printlog "- 'Position' => ok"
622 if Position.IsEnabled = true then
623 Warnlog "- 'Position' should be disabled"
625 printlog "- 'Position' disabled => ok"
628 if ApplyBorderAndShadow.IsChecked = false then
629 Warnlog "- 'Apply Border and Shadow' changed after restart"
631 printlog "- 'Apply Border and Shadow => ok"
635 if Position.GetSelIndex <> 2 then
636 Warnlog "- 'Position' changed after restart"
638 printlog "- 'Position' => ok"
642 if Position.GetSelIndex <> 1 then
643 Warnlog "- 'Position' changed after restart"
645 printlog "- 'Position' => ok"
649 if Position.GetSelIndex <> 2 then
650 Warnlog "- 'Position' changed after restart"
652 printlog "- 'Position' => ok"
656 if Position.GetSelIndex <> 1 then
657 Warnlog "- 'Position' changed after restart"
659 printlog "- 'Position' => ok"
663 if Numbering.GetItemCount > 7 then
664 if Numbering.GetSelIndex <> Numbering.GetItemCount then
665 Warnlog "- 'Numbering' changed after restart"
667 printlog "- 'Numbering' => ok"
670 if Numbering.GetSelIndex <> 4 then
671 Warnlog "- 'Numbering' changed after restart"
673 printlog "- 'Numbering' => ok"
677 if Position.GetSelIndex <> 2 then
678 Warnlog "- 'Position' changed after restart"
680 printlog "- 'Position' => ok"
684 if Numbering.GetItemCount > 7 then
685 if Numbering.GetSelIndex <> Numbering.GetItemCount then
686 Warnlog "- Numbering changed after restart"
688 printlog "- Numbering => ok"
691 if Numbering.GetSelIndex <> 5 then
692 Warnlog "- 'Numbering changed after restart"
694 printlog "- 'Numbering' => ok"
698 if Position.GetSelIndex <> 1 then
699 Warnlog "- 'Position' changed after restart"
701 printlog "- 'Position' => ok"
706 Warnlog "- " & ObjectList.GetText & " is not checked"
710 Kontext "ExtrasOptionenDlg"
713 printlog ("'/// - restore states ///")
716 Call hToolsOptions ("WRITER","AutoCaption")
717 Kontext "TabAutoCaption"
719 for i=1 to NumberOfObjects
720 ObjectList.Select (i)
721 if ObjectList.IsChecked then
722 if vCategory(i) > Category.GetItemCount then
723 Category.Select Category.GetItemCount
725 Category.Select vCategory(i)
727 Numbering.Select vNumbering(i)
728 CaptionSeparator.SetText vCaptionSeparator(i)
729 if Position.IsEnabled then Position.Select vPosition(i)
730 Level.Select vLevel(i)
731 ChapterSeparator.Settext vChapterSeparator(i)
732 CharacterStyle.Select vCharacterStyle(i)
733 if ApplyBorderAndShadow.IsEnabled then
734 Select Case vApplyBorderAndShadow(i)
736 ApplyBorderAndShadow.Check
738 ApplyBorderAndShadow.Uncheck
742 Select case vObjectList(i)
751 Kontext "ExtrasOptionenDlg"
754 Do Until GetDocumentCount = 0
759 '------------------------------------------------------------------------------
761 testcase tToolsOptionsWriterGeneral
763 Dim ist_aktualisiert as boolean
764 Dim CompareThis as string
766 ' State is saved with document. Thats why I use 3 docs
768 printlog "'///- Extras / Optionen / Sonstiges / Verkn?pfungen aktualisieren ///"
770 Call hToolsOptions("WRITER","GENERAL")
771 printlog "'///- Update links when loading -> always ///"
773 Kontext "ExtrasOptionenDlg"
777 Dateiname.SetText ConvertPath(gtesttoolpath + "writer\optional\input\masterdoc\update1.sxg")
780 if active.exists then
781 if Active.GetRT = 304 then
782 Warnlog Active.Gettext
783 Warnlog "Update all links should not appear!"
797 Call hToolsOptions("WRITER","GENERAL")
798 if not Immer.IsChecked then Warnlog "Option 'always' has not been changed"
799 printlog "'///- Update links when loading -> On request ///"
801 Kontext "ExtrasOptionenDlg"
805 Dateiname.SetText ConvertPath(gtesttoolpath + "writer\optional\input\masterdoc\update2.sxg")
809 if active.exists then
810 if Active.GetRT = 304 then
813 Warnlog "Update all links should appear!"
821 Call hToolsOptions("WRITER","GENERAL")
822 if not AufNachfrage.IsChecked then Warnlog "Option 'On request' has been changed"
823 printlog "'///- Update links when loading -> Never ///"
825 Kontext "ExtrasOptionenDlg"
829 Dateiname.SetText ConvertPath(gtesttoolpath + "writer\optional\input\masterdoc\update3.sxg")
832 if active.exists then
833 if Active.GetRT = 304 then
834 Warnlog "Update all links should not appear!"
839 Kontext "DocumentWriter"
840 DocumentWriter.TypeKeys "<Up>",10
841 DocumentWriter.TypeKeys "<Mod1 Home>", 4
843 DocumentWriter.TypeKeys "<Shift End>"
846 if i <> 4 and GetClipboardtext <> "Dies ist der Text" then ist_aktualisiert = true
848 ist_aktualisiert=false
850 DocumentWriter.TypeKeys "<Mod1 End>"
852 DocumentWriter.TypeKeys "<Down><Home>"
854 if ist_aktualisiert=true then Warnlog " Document has been updated !"
860 Call hToolsOptions("WRITER","GENERAL")
861 if Nie.IsChecked = false then Warnlog "Option 'Never' is not checked"
863 Kontext "ExtrasOptionenDlg"
866 Do Until GetDocumentCount = 0
871 '------------------------------------------------------------------------------
873 testcase tToolsOptionsWriterMailMerge
876 printlog ("'///- Tools/Options/Writer: Mail Merge ///")
878 if Navigator.Exists then ViewNavigator
880 Call hToolsOptions ("WRITER","MailMergeEMail")
882 '/// Fill out all fields
883 printlog " - fill out Mail Settings"
884 Kontext "TabMailMergeEmail"
885 YourName.Settext "Fredrik Haegg"
886 EmailAddress.Settext "helge.delfs@sun.com"
888 ReplyAddress.Settext "fredrikh@openoffice.org"
889 ServerName.Settext "MySMTP-Server"
892 '/// Change details for Server Authentication
893 printlog " - fill out Authentication Settings"
894 ServerAuthentication.Click
896 Kontext "ServerAuthentication"
897 SMTPauthentication.Check
899 IncomingMailServer.Check
900 Server.Settext "MySMTP-Server"
903 User.Settext "MyAuthenticationUserName"
904 Password.Settext "MyAuthenticationPassword"
905 ServerAuthentication.Ok
907 '/// Close 'Server Authentication dialog, reopen and check values set
908 printlog " - check settings"
909 Kontext "TabMailMergeEmail"
910 ServerAuthentication.Click
912 Kontext "ServerAuthentication"
913 if Not SMTPauthentication.IsChecked then Warnlog "SMTP Authentication is not checked anymore"
914 if Not IncomingMailServer.IsChecked then Warnlog "Incoming Mail Server has been changed"
915 if Server.Gettext <> "MySMTP-Server" then Warnlog "Servername has been changed"
916 if Port.Gettext <> "111" then Warnlog "Server Port has been changed"
917 if Not IMAP.IsChecked then Warnlog "IMAP-state has been changed"
918 if User.Gettext <> "MyAuthenticationUserName" then Warnlog "Authentication username has been changed"
919 if Password.Gettext <> "MyAuthenticationPassword" then Warnlog "Authentication password has been changed"
921 '/// Change settings for SMTP outgoing
923 OutgoingUsername.Settext "MyOutgoingUsername"
924 OutgoingPassword.Settext "MyOutgoingPassword"
925 ServerAuthentication.Ok
927 '/// Close options dialog and restart the office
928 Kontext "ExtrasOptionenDlg"
930 printlog " - restart office"
933 '/// Reopen Tools/Options and check settings
934 printlog " - check settings"
936 Call hToolsOptions ("WRITER","MailMergeEMail")
938 Kontext "TabMailMergeEmail"
939 if YourName.Gettext <> "Fredrik Haegg" then Warnlog "'Your Name' has been changed after a restart"
940 if EmailAddress.Gettext <> "helge.delfs@sun.com" then Warnlog "'Email Address' has been changed after a restart"
941 if Not SendReplies.IsChecked then Warnlog "'Send replies' has been changed after a restart"
942 if ReplyAddress.Gettext <> "fredrikh@openoffice.org" then Warnlog "'Reply adresses' has been changed after a restart"
943 if ServerName.Gettext <> "MySMTP-Server" then Warnlog "'Server name' has been changed after a restart"
944 if UseSecure.IsChecked = false then Warnlog "'Secure' has been changed after a restart"
946 ServerAuthentication.Click
948 Kontext "ServerAuthentication"
949 if Not SMTPOutgoing.IsChecked then Warnlog "'SMTP Server' has been changed after a restart"
950 if OutgoingUsername.Gettext <> "MyOutgoingUsername" then Warnlog "'Username' has been changed after a restart"
951 if OutgoingPassword.Gettext <> "MyOutgoingPassword" then Warnlog "'Password' has been changed after a restart"
953 ServerAuthentication.Ok
955 '/// Check 'Test Settings' button
956 Kontext "TabMailMergeEmail"
959 Kontext "TestAccountSettings"
961 if TaskStatusListBox.GetItemCount > 0 then
962 TestAccountSettings.Cancel
967 if TestAccountSettings.Exists then TestAccountSettings.Cancel
969 '/// Reset all states
970 Kontext "TabMailMergeEmail"
971 ServerAuthentication.Click
973 Kontext "ServerAuthentication"
974 IncomingMailServer.Check
981 OutgoingUsername.Settext ""
982 OutgoingPassword.Settext ""
984 SMTPauthentication.UnCheck
985 ServerAuthentication.Ok
987 Kontext "TabMailMergeEmail"
989 EmailAddress.Settext = ""
990 ReplyAddress.Settext ""
991 ServerName.Settext ""
995 '/// Close options dialog and restart the office
996 Kontext "ExtrasOptionenDlg"
999 Do Until GetDocumentCount = 0
1003 '------------------------------------------------------------------------------