Update ooo320-m1
[ooovba.git] / testautomation / global / tools / includes / required / t_tools3.inc
blobc2e976659e2b791a5f8cff520df8382ad3871559
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: t_tools3.inc,v $
11 '* $Revision: 1.1 $
13 '* last change: $Author: jsi $ $Date: 2008-06-13 10:27:11 $
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 : Global Tools III
38 '\*************************************************************************************
41 sub hToolbarSelect( sType as string, sOpen as boolean, optional SetToDefault as boolean )
42     Dim sDefault as integer, sKontext as string, sPosition as integer
43     Dim SteppedThrough as boolean
44     '/// Created by helge.delfs@sun.com
45     '/// This function opens/closes a toolbar through View/Toolbar menu
46     '/// Required parameters:
47     '/// sType as string                -> Name of the toolbar to be opened / closed
48     '/// sOpen as boolean       -> Shall the toolbar be opened (true) or closed (false)
49     '/// optional SetToDefault as boolean -> true if Toolbar-State should be set to default
51         Select Case Ucase(sType)
52         case "3DSETTING"
53             Kontext "ExtrusionObjectBar"
54             if ExtrusionObjectBar.Exists then
55                 Select Case sOpen
56                     Case False
57                         if IsMissing(SetToDefault) then
58                             ViewToolbarsThreeDSettings
59                         else
60                             if SetToDefault = True then ViewToolbarsThreeDSettings
61                         endif
62                     Case True
63                         if IsMissing(SetToDefault) = False then
64                             if SetToDefault = True then ViewToolbarsThreeDSettings
65                         endif
66                 end select
67             else
68                 if sOpen = True then
69                     if IsMissing(SetToDefault) then
70                         ViewToolbarsThreeDSettings
71                     endif
72                 endif
73             endif
74                 
76         case "ALIGN"                                    
77             Kontext "Alignmentbar"
78             if Alignmentbar.Exists then
79                 Select Case sOpen
80                     Case False
81                         if IsMissing(SetToDefault) then
82                             ViewToolbarsAlign
83                         else
84                             if SetToDefault = True then ViewToolbarsAlign
85                         endif
86                     Case True
87                         if IsMissing(SetToDefault) = False then
88                             if SetToDefault = True then ViewToolbarsAlign
89                         endif
90                 end select
91             else
92                 if sOpen = True then
93                     if IsMissing(SetToDefault) then
94                         ViewToolbarsAlign
95                     endif
96                 endif
97             endif
98                                    
99         Case "BULLETSANDNUMBERING"
100             Kontext "NumObjectbar"
101             if NumObjectbar.Exists then
102                 Select Case sOpen
103                     Case False
104                         if IsMissing(SetToDefault) then
105                             ViewToolbarsBulletsAndNumbering
106                         else
107                             if SetToDefault = True then ViewToolbarsBulletsAndNumbering
108                         endif
109                     Case True
110                         if IsMissing(SetToDefault) = False then
111                             if SetToDefault = True then ViewToolbarsBulletsAndNumbering
112                         endif
113                 end select
114             else
115                 if sOpen = True then
116                     if IsMissing(SetToDefault) then
117                         ViewToolbarsBulletsAndNumbering
118                     endif
119                 endif
120             endif                       
121             
122         case "COLOR"            
123             Kontext "ColorBar"
124             if ColorBar.Exists then
125                 Select Case sOpen
126                     Case False
127                         if IsMissing(SetToDefault) then
128                             ViewToolbarsColor
129                         else
130                             if SetToDefault = True then ViewToolbarsColor
131                         endif
132                     Case True
133                         if IsMissing(SetToDefault) = False then
134                             if SetToDefault = True then ViewToolbarsColor
135                         endif
136                 end select
137             else
138                 if sOpen = True then
139                     if IsMissing(SetToDefault) then
140                         ViewToolbarsColor
141                     endif
142                 endif
143             endif
144          
145         case "CUSTOMIZE"
146             ViewToolbarsCustomize
147                     
148         case "DRAWING"  
149             Kontext "DrawBar"
150             if DrawBar.Exists then
151                 Select Case sOpen
152                     Case False
153                         if IsMissing(SetToDefault) then
154                             ViewToolbarsDrawing
155                         else
156                             if SetToDefault = True then ViewToolbarsDrawing
157                         endif
158                     Case True
159                         if IsMissing(SetToDefault) = False then
160                             if SetToDefault = True then ViewToolbarsDrawing
161                         endif
162                 end select
163             else
164                 if sOpen = True then
165                     if IsMissing(SetToDefault) then
166                         ViewToolbarsDrawing
167                     endif
168                 endif
169             endif
170                                         
171         case "FORMATTING"
172             Kontext "TextObjectbar"
173             if TextObjectbar.Exists then
174                 Select Case sOpen
175                     Case False
176                         if IsMissing(SetToDefault) then
177                             ViewToolbarsFormatting
178                         endif
179                 end select
180             else
181                 if sOpen = True then
182                     if IsMissing(SetToDefault) then
183                         ViewToolbarsFormatting
184                     else
185                         if SetToDefault = True then ViewToolbarsFormatting
186                     endif
187                 endif
188             endif
190         case "FORMCONTROLS"
191             Kontext "FormControls"
192             if FormControls.Exists then
193                 Select Case sOpen
194                     Case False
195                         if IsMissing(SetToDefault) then
196                             ViewToolbarsFormControls
197                         else
198                             if SetToDefault = True then ViewToolbarsFormControls
199                         endif
200                     Case True
201                         if IsMissing(SetToDefault) = False then
202                             if SetToDefault = True then ViewToolbarsFormControls
203                         endif
204                 end select
205             else
206                 if sOpen = True then
207                     if IsMissing(SetToDefault) then
208                         ViewToolbarsFormControls
209                     endif
210                 endif
211             endif
212         case "CONTROLS"
213             Kontext "FormControls"
214             if FormControls.Exists then
215                 Select Case sOpen
216                     Case False
217                         if IsMissing(SetToDefault) then
218                             ViewToolbarsFormControls
219                         else
220                             if SetToDefault = True then ViewToolbarsFormControls
221                         endif
222                     Case True
223                         if IsMissing(SetToDefault) = False then
224                             if SetToDefault = True then ViewToolbarsFormControls
225                         endif
226                 end select
227             else
228                 if sOpen = True then
229                     if IsMissing(SetToDefault) then
230                         ViewToolbarsFormControls
231                     endif
232                 endif
233             endif                
234             
235         case "FORMDESIGNTOOLS", "FORMDESIGN"                    
236             Kontext "FormDesignTools"
237             if FormDesignTools.Exists then
238                 Select Case sOpen
239                     Case False
240                         if IsMissing(SetToDefault) then
241                             ViewToolbarsFormDesign
242                         else
243                             if SetToDefault = True then ViewToolbarsFormDesign
244                         endif
245                     Case True
246                         if IsMissing(SetToDefault) = False then
247                             if SetToDefault = True then ViewToolbarsFormDesign
248                         endif
249                 end select
250             else
251                 if sOpen = True then
252                     if IsMissing(SetToDefault) then
253                         ViewToolbarsFormDesign
254                     endif
255                 endif
256             endif
257                 
258         case "HTMLSOURCEVIEW"                   
259             Kontext "SourceViewToolbar"
260             if SourceViewToolbar.Exists then
261                 Select Case sOpen
262                     Case False
263                         if IsMissing(SetToDefault) then
264                             ViewToolbarsHTMLSourceView
265                         else
266                             if SetToDefault = True then ViewToolbarsHTMLSourceView
267                         endif
268                     Case True
269                         if IsMissing(SetToDefault) = False then
270                             if SetToDefault = True then ViewToolbarsHTMLSourceView
271                         endif
272                 end select
273             else
274                 if sOpen = True then
275                     if IsMissing(SetToDefault) then
276                         ViewToolbarsHTMLSourceView
277                     endif
278                 endif
279             endif
281         case "FORMFILTER"
282             Kontext "FormsFilterBar"
283             if FormsFilterBar.Exists then
284                 Select Case sOpen
285                     Case False
286                         if IsMissing(SetToDefault) then
287                             ViewToolbarsFormFilter
288                         else
289                             if SetToDefault = True then ViewToolbarsFormFilter
290                         endif
291                     Case True
292                         if IsMissing(SetToDefault) = False then
293                             if SetToDefault = True then ViewToolbarsFormFilter
294                         endif
295                 end select
296             else
297                 if sOpen = True then
298                     if IsMissing(SetToDefault) then
299                         ViewToolbarsFormFilter
300                     endif
301                 endif
302             endif
304         case "FORMNAVIGATION"
305             Kontext "FormsNavigationBar"
306             if FormsNavigationBar.Exists then
307                 Select Case sOpen
308                     Case False
309                         if IsMissing(SetToDefault) then
310                             ViewToolbarsFormNavigation
311                         else
312                             if SetToDefault = True then ViewToolbarsFormNavigation
313                         endif
314                     Case True
315                         if IsMissing(SetToDefault) = False then
316                             if SetToDefault = True then ViewToolbarsFormNavigation
317                         endif
318                 end select
319             else
320                 if sOpen = True then
321                     if IsMissing(SetToDefault) then
322                         ViewToolbarsFormNavigation
323                     endif
324                 endif
325             endif
326              
327         case "FORMOBJECT"
328             Kontext "FormsObjectbar"
329             if FormsObjectbar.Exists then
330                 Select Case sOpen
331                     Case False
332                         if IsMissing(SetToDefault) then
333                             ViewToolbarsFormObject
334                         else
335                             if SetToDefault = True then ViewToolbarsFormObject
336                         endif
337                     Case True
338                         if IsMissing(SetToDefault) = False then
339                             if SetToDefault = True then ViewToolbarsFormObject
340                         endif
341                 end select
342             else
343                 if sOpen = True then
344                     if IsMissing(SetToDefault) then
345                         ViewToolbarsFormObject
346                     endif
347                 endif
348             endif
350         case "FRAME"    
351             Kontext "FrameObjectbar"
352             if FrameObjectbar.Exists then
353                 Select Case sOpen
354                     Case False
355                         if IsMissing(SetToDefault) then
356                             ViewToolbarsFrame
357                         else
358                             if SetToDefault = True then ViewToolbarsFrame
359                         endif
360                     Case True
361                         if IsMissing(SetToDefault) = False then
362                             if SetToDefault = True then ViewToolbarsFrame
363                         endif
364                 end select
365             else
366                 if sOpen = True then
367                     if IsMissing(SetToDefault) then
368                         ViewToolbarsFrame
369                     endif
370                 endif
371             endif
373         case "FULLSCREEN"
374             Kontext "FullScreenBar"
375             if FullScreenBar.Exists then
376                 Select Case sOpen
377                     Case False
378                         if IsMissing(SetToDefault) then
379                             ViewToolbarsFullScreen
380                         else
381                             if SetToDefault = True then ViewToolbarsFullScreen
382                         endif
383                     Case True
384                         if IsMissing(SetToDefault) = False then
385                             if SetToDefault = True then ViewToolbarsFullScreen
386                         endif
387                 end select
388             else
389                 if sOpen = True then
390                     if IsMissing(SetToDefault) then
391                         ViewToolbarsFullScreen
392                     endif
393                 endif
394             endif
395             
396         case "GRAPHIC", "DRAWINGOBJECTPROPERTIES"
397             Kontext "DrawingObjectbar"
398             if DrawingObjectbar.Exists then
399                 Select Case sOpen
400                     Case False
401                         if IsMissing(SetToDefault) then
402                             ViewToolbarsGraphic
403                         else
404                             if SetToDefault = True then ViewToolbarsGraphic
405                         endif
406                     Case True
407                         if IsMissing(SetToDefault) = False then
408                             if SetToDefault = True then ViewToolbarsGraphic
409                         endif
410                 end select
411             else
412                 if sOpen = True then
413                     if IsMissing(SetToDefault) then
414                         ViewToolbarsGraphic
415                     endif
416                 endif
417             endif
419         case "HYPERLINK", "HYPERLINKBAR"
420             Kontext "Hyperlinkleiste"
421             if Hyperlinkleiste.Exists then
422                 Select Case sOpen
423                     Case False
424                         if IsMissing(SetToDefault) then
425                             ViewToolbarsInsertHyperlink
426                         else
427                             if SetToDefault = True then ViewToolbarsInsertHyperlink
428                         endif
429                     Case True
430                         if IsMissing(SetToDefault) = False then
431                             if SetToDefault = True then ViewToolbarsInsertHyperlink
432                         endif
433                 end select
434             else
435                 if sOpen = True then
436                     if IsMissing(SetToDefault) then
437                         ViewToolbarsInsertHyperlink
438                     endif
439                 endif
440             endif
441                         
442             
443         case "INSERT"           
444             Kontext "InsertBar"
445             if InsertBar.Exists then
446                 Select Case sOpen
447                     Case False
448                         if IsMissing(SetToDefault) then
449                             ViewToolbarsInsert
450                         else
451                             if SetToDefault = True then ViewToolbarsInsert
452                         endif
453                     Case True
454                         if IsMissing(SetToDefault) = False then
455                             if SetToDefault = True then ViewToolbarsInsert
456                         endif
457                 end select
458             else
459                 if sOpen = True then
460                     if IsMissing(SetToDefault) then
461                         ViewToolbarsInsert
462                     endif
463                 endif
464             endif
465                                     
466         case "INSERTOBJECT"
467             Kontext "InsertObjectBar"
468             if InsertObjectBar.Exists then
469                 Select Case sOpen
470                     Case False
471                         if IsMissing(SetToDefault) then
472                             ViewToolbarsInsertObject
473                         else
474                             if SetToDefault = True then ViewToolbarsInsertObject
475                         endif
476                     Case True
477                         if IsMissing(SetToDefault) = False then
478                             if SetToDefault = True then ViewToolbarsInsertObject
479                         endif
480                 end select
481             else
482                 if sOpen = True then
483                     if IsMissing(SetToDefault) then
484                         ViewToolbarsInsertObject
485                     endif
486                 endif
487             endif
488            
489         case "MEDIAPLAYBACK"            
490             Kontext "MediaObjectBar"
491             if MediaObjectBar.Exists then
492                 Select Case sOpen
493                     Case False
494                         if IsMissing(SetToDefault) then
495                             ViewToolbarsMediaPlayback
496                         else
497                             if SetToDefault = True then ViewToolbarsMediaPlayback
498                         endif
499                     Case True
500                         if IsMissing(SetToDefault) = False then
501                             if SetToDefault = True then ViewToolbarsMediaPlayback
502                         endif
503                 end select
504             else
505                 if sOpen = True then
506                     if IsMissing(SetToDefault) then
507                         ViewToolbarsMediaPlayback
508                     endif
509                 endif
510             endif
511                                     
512         case "MORECONTROLS"
513             Kontext "MoreControls"
514             if MoreControls.Exists then
515                 Select Case sOpen
516                     Case False
517                         if IsMissing(SetToDefault) then
518                             ViewToolbarsMoreControls
519                         else
520                             if SetToDefault = True then ViewToolbarsMoreControls
521                         endif
522                     Case True
523                         if IsMissing(SetToDefault) = False then
524                             if SetToDefault = True then ViewToolbarsMoreControls
525                         endif
526                 end select
527             else
528                 if sOpen = True then
529                     if IsMissing(SetToDefault) then
530                         ViewToolbarsMoreControls
531                     endif
532                 endif
533             endif
534                             
535         case "MOREXFORMCONTROLS"
536             Kontext "MoreXFormControls"
537             if MoreXFormControls.Exists then
538                 Select Case sOpen
539                     Case False
540                         if IsMissing(SetToDefault) then
541                             ViewToolbarsMoreXFormControls
542                         else
543                             if SetToDefault = True then ViewToolbarsMoreXFormControls
544                         endif
545                     Case True
546                         if IsMissing(SetToDefault) = False then
547                             if SetToDefault = True then ViewToolbarsMoreXFormControls
548                         endif
549                 end select
550             else
551                 if sOpen = True then
552                     if IsMissing(SetToDefault) then
553                         ViewToolbarsMoreXFormControls
554                     endif
555                 endif
556             endif
557                 
558         case "OLEOBJECT"                
559             Kontext "OLEObjectbar"
560             if OLEObjectbar.Exists then
561                 Select Case sOpen
562                     Case False
563                         if IsMissing(SetToDefault) then
564                             ViewToolbarsOleObject
565                         else
566                             if SetToDefault = True then ViewToolbarsOleObject
567                         endif
568                     Case True
569                         if IsMissing(SetToDefault) = False then
570                             if SetToDefault = True then ViewToolbarsOleObject
571                         endif
572                 end select
573             else
574                 if sOpen = True then
575                     if IsMissing(SetToDefault) then
576                         ViewToolbarsOleObject
577                     endif
578                 endif
579             endif
580                         
581         case "OPTIMIZETABLE"
582             Kontext "OptimizeTablebar"
583             if OptimizeTablebar.Exists then
584                 Select Case sOpen
585                     Case False
586                         if IsMissing(SetToDefault) then
587                             ViewToolbarsOptimizeTable
588                         else
589                             if SetToDefault = True then ViewToolbarsOptimizeTable
590                         endif
591                     Case True
592                         if IsMissing(SetToDefault) = False then
593                             if SetToDefault = True then ViewToolbarsOptimizeTable
594                         endif
595                 end select
596             else
597                 if sOpen = True then
598                     if IsMissing(SetToDefault) then
599                         ViewToolbarsOptimizeTable
600                     endif
601                 endif
602             endif
603                         
604         case "PAGEPREVIEW"
605             Kontext "PreviewObjectbar"
606             if PreviewObjectbar.Exists then
607                 Select Case sOpen
608                     Case False
609                         if IsMissing(SetToDefault) then
610                             ViewToolbarsPagePreview
611                         else
612                             if SetToDefault = True then ViewToolbarsPagePreview
613                         endif
614                     Case True
615                         if IsMissing(SetToDefault) = False then
616                             if SetToDefault = True then ViewToolbarsPagePreview
617                         endif
618                 end select
619             else
620                 if sOpen = True then
621                     if IsMissing(SetToDefault) then
622                         ViewToolbarsPagePreview
623                     endif
624                 endif
625             endif
626                                     
627         case "PATH"
628             Kontext "BezierObjectBar"
629             if BezierObjectBar.Exists then
630                 Select Case sOpen
631                     Case False
632                         if IsMissing(SetToDefault) then
633                             ViewToolbarsBezier
634                         else
635                             if SetToDefault = True then ViewToolbarsBezier
636                         endif
637                     Case True
638                         if IsMissing(SetToDefault) = False then
639                             if SetToDefault = True then ViewToolbarsBezier
640                         endif
641                 end select
642             else
643                 if sOpen = True then
644                     if IsMissing(SetToDefault) then
645                         ViewToolbarsBezier
646                     endif
647                 endif
648             endif
649                                                
650         case "PICTURE"          
651             Kontext "GraphicObjectbar"
652             if GraphicObjectbar.Exists then
653                 Select Case sOpen
654                     Case False
655                         if IsMissing(SetToDefault) then
656                             ViewToolbarsPicture
657                         else
658                             if SetToDefault = True then ViewToolbarsPicture
659                         endif
660                     Case True
661                         if IsMissing(SetToDefault) = False then
662                             if SetToDefault = True then ViewToolbarsPicture
663                         endif
664                 end select
665             else
666                 if sOpen = True then
667                     if IsMissing(SetToDefault) then
668                         ViewToolbarsPicture
669                     endif
670                 endif
671             endif
672                                     
673         case "PICTUREFILTER"
674             Kontext "GraphicFilterBar"
675             if GraphicFilterBar.Exists then
676                 Select Case sOpen
677                     Case False
678                         if IsMissing(SetToDefault) then
679                             ViewToolbarsPictureFilter
680                         else
681                             if SetToDefault = True then ViewToolbarsPictureFilter
682                         endif
683                     Case True
684                         if IsMissing(SetToDefault) = False then
685                             if SetToDefault = True then ViewToolbarsPictureFilter
686                         endif
687                 end select
688             else
689                 if sOpen = True then
690                     if IsMissing(SetToDefault) then
691                         ViewToolbarsPictureFilter
692                     endif
693                 endif
694             endif
695                         
696         case "STANDARD"            
697             Kontext "StandardBar"
698             if StandardBar.Exists then
699                 if StandardBar.IsVisible then
700                     Select Case sOpen
701                         Case False
702                             if IsMissing(SetToDefault) then
703                                 ViewToolbarsStandard
704                             endif
705                         end select
706                 else
707                     if sOpen = True then
708                         if IsMissing(SetToDefault) then
709                             ViewToolbarsStandard
710                         else
711                             if SetToDefault = True then ViewToolbarsStandard
712                         endif
713                     endif
714                 endif               
715             else
716                 if sOpen = True then
717                     if IsMissing(SetToDefault) then
718                         ViewToolbarsStandard
719                     else
720                         if SetToDefault = True then ViewToolbarsStandard
721                     endif
722                 endif
723             endif
725         case "STANDARDVIEWINGMODE"              
726             Kontext "Viewerbar"
727             if Viewerbar.Exists then
728                 Select Case sOpen
729                     Case False
730                         if IsMissing(SetToDefault) then
731                             ViewToolbarsStandardView
732                         else
733                             if SetToDefault = True then ViewToolbarsStandardView
734                         endif
735                     Case True
736                         if IsMissing(SetToDefault) = False then
737                             if SetToDefault = True then ViewToolbarsStandardView
738                         endif
739                 end select
740             else
741                 if sOpen = True then
742                     if IsMissing(SetToDefault) then
743                         ViewToolbarsStandardView
744                     endif
745                 endif
746             endif
747                         
748         case "TABLE"
749             Kontext "TableObjectbar"
750             if TableObjectbar.Exists then
751                 Select Case sOpen
752                     Case False
753                         if IsMissing(SetToDefault) then
754                             ViewToolbarsTable
755                         else
756                             if SetToDefault = True then ViewToolbarsTable
757                         endif
758                     Case True
759                         if IsMissing(SetToDefault) = False then
760                             if SetToDefault = True then ViewToolbarsTable
761                         endif
762                 end select
763             else
764                 if sOpen = True then
765                     if IsMissing(SetToDefault) then
766                         ViewToolbarsTable
767                     endif
768                 endif
769             endif
770                                                                                                                         
771         case "TEXTOBJECT"
772             Kontext "DrawTextObjectBar"
773             if DrawTextObjectBar.Exists then
774                 Select Case sOpen
775                     Case False
776                         if IsMissing(SetToDefault) then
777                             ViewToolbarsTextObject
778                         else
779                             if SetToDefault = True then ViewToolbarsTextObject
780                         endif
781                     Case True
782                         if IsMissing(SetToDefault) = False then
783                             if SetToDefault = True then ViewToolbarsTextObject
784                         endif
785                 end select
786             else
787                 if sOpen = True then
788                     if IsMissing(SetToDefault) then
789                         ViewToolbarsTextObject
790                     endif
791                 endif
792             endif
793                                                                                                 
794         case "TOOLS"            
795             Kontext "Toolbar"
796             if Toolbar.Exists then
797                 Select Case sOpen
798                     Case False
799                         if IsMissing(SetToDefault) then
800                             ViewToolbarsTools
801                         else
802                             if SetToDefault = True then ViewToolbarsTools
803                         endif
804                     Case True
805                         if IsMissing(SetToDefault) = False then
806                             if SetToDefault = True then ViewToolbarsTools
807                         endif
808                 end select
809             else
810                 if sOpen = True then
811                     if IsMissing(SetToDefault) then
812                         ViewToolbarsTools
813                     endif
814                 endif
815             endif
816             
817                 
818         case "MATH"
819             Kontext "OL_SW_Rechenleiste"
820             if OL_SW_Rechenleiste.Exists then
821                 Select Case sOpen
822                     Case False
823                         if IsMissing(SetToDefault) then
824                             ViewToolbarsInsertFormula
825                         else
826                             if SetToDefault = True then ViewToolbarsInsertFormula
827                         endif
828                     Case True
829                         if IsMissing(SetToDefault) = False then
830                             if SetToDefault = True then ViewToolbarsInsertFormula
831                         endif
832                 end select
833             else
834                 if sOpen = True then
835                     if IsMissing(SetToDefault) then
836                         ViewToolbarsInsertFormula
837                     endif
838                 endif
839             endif
840                                         
841         case else
842             Warnlog "No menuentry for parameter " & sType & " found!"
843              
844         end select    
845         Sleep 1
846         
847 end sub
849 sub hCloseAllToolbars
850     '/// Created by thorsten.bosbach@sun.com
851     '/// This function closes all known toolbars which are not docked
852     '/// only if Build ID is below 8892
853     if (gBuild < 8892) AND (gBuild > 8888) then
854         try
855                 Kontext "ExtrusionObjectBar"
856                 if ExtrusionObjectBar.Exists(0) then if NOT ExtrusionObjectBar.isDocked then ExtrusionObjectBar.close
857                 Kontext "Alignmentbar"
858                 if Alignmentbar.Exists(0) then if NOT Alignmentbar.isDocked then Alignmentbar.close
859                 Kontext "NumObjectbar"
860                 if NumObjectbar.Exists(0) then if NOT NumObjectbar.isDocked then NumObjectbar.close
861                 Kontext "DrawBar"
862                 if DrawBar.Exists(0) then if NOT DrawBar.isDocked then DrawBar.close
863                 Kontext "TextObjectbar"
864                 if TextObjectbar.Exists(0) then if NOT TextObjectbar.isDocked then TextObjectbar.close
865                 Kontext "FormControls"
866                 if FormControls.Exists(0) then if NOT FormControls.isDocked then FormControls.close
867                 Kontext "FormControls"
868                 if FormControls.Exists(0) then if NOT FormControls.isDocked then FormControls.close
869                 Kontext "FormDesignTools"
870                 if FormDesignTools.Exists(0) then if NOT FormDesignTools.isDocked then FormDesignTools.close
871                 Kontext "SourceViewToolbar"
872                 if SourceViewToolbar.Exists(0) then if NOT SourceViewToolbar.isDocked then SourceViewToolbar.close
873                 Kontext "FormsFilterBar"
874                 if FormsFilterBar.Exists(0) then if NOT FormsFilterBar.isDocked then FormsFilterBar.close
875                 Kontext "FormsNavigationBar"
876                 if FormsNavigationBar.Exists(0) then if NOT FormsNavigationBar.isDocked then FormsNavigationBar.close
877                 Kontext "FormsObjectbar"
878                 if FormsObjectbar.Exists(0) then if NOT FormsObjectbar.isDocked then FormsObjectbar.close
879                 Kontext "FrameObjectbar"
880                 if FrameObjectbar.Exists(0) then if NOT FrameObjectbar.isDocked then FrameObjectbar.close
881                 Kontext "FullScreenBar"
882                 if FullScreenBar.Exists(0) then if NOT FullScreenBar.isDocked then FullScreenBar.close
883                 Kontext "DrawingObjectbar"
884                 if DrawingObjectbar.Exists(0) then if NOT DrawingObjectbar.isDocked then DrawingObjectbar.close
885                 Kontext "Hyperlinkleiste"
886                 if Hyperlinkleiste.Exists(0) then if NOT Hyperlinkleiste.isDocked then Hyperlinkleiste.close
887                 Kontext "InsertBar"
888                 if InsertBar.Exists(0) then if NOT InsertBar.isDocked then InsertBar.close
889                 Kontext "InsertObjectBar"
890                 if InsertObjectBar.Exists(0) then if NOT InsertObjectBar.isDocked then InsertObjectBar.close
891                 Kontext "MediaObjectBar"
892                 if MediaObjectBar.Exists(0) then if NOT MediaObjectBar.isDocked then MediaObjectBar.close
893                 Kontext "MoreControls"
894                 if MoreControls.Exists(0) then if NOT MoreControls.isDocked then MoreControls.close
895                 Kontext "OLEObjectbar"
896                 if OLEObjectbar.Exists(0) then if NOT OLEObjectbar.isDocked then OLEObjectbar.close
897                 Kontext "OptimizeTablebar"
898                 if OptimizeTablebar.Exists(0) then if NOT OptimizeTablebar.isDocked then OptimizeTablebar.close
899                 Kontext "PreviewObjectbar"
900                 if PreviewObjectbar.Exists(0) then if NOT PreviewObjectbar.isDocked then PreviewObjectbar.close
901                 Kontext "BezierObjectBar"
902                 if BezierObjectBar.Exists(0) then if NOT BezierObjectBar.isDocked then BezierObjectBar.close
903                 Kontext "GraphicObjectbar"
904                 if GraphicObjectbar.Exists(0) then if NOT GraphicObjectbar.isDocked then GraphicObjectbar.close
905                 Kontext "GraphicFilterBar"
906                 if GraphicFilterBar.Exists(0) then if NOT GraphicFilterBar.isDocked then GraphicFilterBar.close
907                 Kontext "StandardBar"
908                 if StandardBar.Exists(0) then if NOT StandardBar.isDocked then StandardBar.close
909                 Kontext "Viewerbar"
910                 if Viewerbar.Exists(0) then if NOT Viewerbar.isDocked then Viewerbar.close
911                 Kontext "TableObjectbar"
912                 if TableObjectbar.Exists(0) then if NOT TableObjectbar.isDocked then TableObjectbar.close
913                 Kontext "DrawTextObjectBar"
914                 if DrawTextObjectBar.Exists(0) then if NOT DrawTextObjectBar.isDocked then DrawTextObjectBar.close
915                 Kontext "Toolbar"
916                 if Toolbar.Exists(0) then if NOT Toolbar.isDocked then Toolbar.close
917                 Kontext "OL_SW_Rechenleiste"
918                 if OL_SW_Rechenleiste.Exists(0) then if NOT OL_SW_Rechenleiste.isDocked then OL_SW_Rechenleiste.close
919         catch
920             printlog "tools3.inc::hCloseAllToolbars Can't close some toolbar"
921         endcatch
922     endif
923 end sub
926 function hIsAccessbridgeInstalled() as boolean
927     '/// created by HDE
928     '/// detects if a Java Access Bridge is installed which decreases testtool performance
929     '/// and should not be installed while running automated tests
930     '/// 1. searches in testtool.ini entry "UseAccessBridge" in profile "current". Is it <> True then
931     '/// 2. searches in directory "C:\Program Files\Java Access Bridge" a Java-Bridge Installation. If this is not found
932     '/// 3. searches in options of installed StarOffice on Java-Tabpage for the entry "with accessibility support"
933     '/// if 1. = true then false is returned, because it should be tested with accessibility 
934     '/// if 2. or 3. matches this func returns true else false 
935     '/// if Java is deactivated in Office options it returns false, because no Java->no AccessBridge 
936     '/// if AccessbridgeIsInstalled = false (after checking on Java-Tabpage) and iSprache <> English a warning will be printed, because the string in options maybe has to be adapted!
937     
938     Dim i as integer, j as integer, sAccessibilityCompare as string
939     Dim sProgramFiles as string, sAccessBridgeFolder as string, sTmpEntry as string    
940     Dim sCompareString as string, AccessbridgeIsInstalled as boolean
941     AccessbridgeIsInstalled = False
942     if GetIniValue ( gTesttoolIni, "UseAccessBridge", "Current" ) = True then
943         AccessbridgeIsInstalled = False
944     else
945         Select case gPlatgroup
946             Case "w95"  
947                 sProgramFiles = environ("ProgramFiles")
948                 sAccessBridgeFolder = "Java Access Bridge"
949                 sCompareString = sProgramFiles & "\" & sAccessBridgeFolder & "\AccessBridgeTester.class"
950                 sAccessibilityCompare = "with accessibility support"
951                 if hFileExists(sCompareString) = True then
952                     AccessbridgeIsInstalled = True
953                 else
954                     ToolsOptions
955                     Call hToolsOptions("STAROFFICE","JAVA")
956                     Kontext "TabJava"
957                     if UseJava.IsChecked = True then
958                         For i = 1 to JavaList.GetItemCount()                                                                               
959                             JavaList.Select i
960                             if JavaList.GetText(4) = sAccessibilityCompare then
961                                 AccessbridgeIsInstalled = True
962                                 exit for
963                             endif
964                         next i
965                                                 if AccessbridgeIsInstalled = false then
966                                     Select Case iSprache
967                                         Case 01 : sAccessibilityCompare = "with accessibility support"
968                                     Case else : Warnlog "Accessibility check failed. Maybe language has to be adapted."
969                                         exit function
970                                 end select
971                             endif
972                     endif
973                     Kontext "OptionenDlg"
974                     OptionenDlg.Cancel
975                 endif                
976         end select
977     endif
978     
979     hIsAccessbridgeInstalled = AccessbridgeIsInstalled
980     
981 end function