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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : oliver.craemer@oracle.com
30 '* short description : Tools for Tools::Options dialog
32 '************************************************************************
34 ' #1 subSetConversionMicrosoftOLE
36 '\***********************************************************************
38 sub subSetConversionMicrosoftOLE ( OPTIONAL sConversionType as STRING )
39 '///<u><b>Routine to adjust the behaviour of Tools::Options::Load/Save::Microsoft Office</b></u>///
40 '///<b>Possible Keys for 'sConversionType' are:</b>///
42 '///<li>RESET (or omitted): Uncheck all boxes (default in a freshly installed OOo))</li>///
43 '///<li>ALL: Check all boxes</li>///
44 '///<li>LOAD: Check all boxes for loading MS OLE objects (left side), uncheck all boxes for saving</li>///
45 '///<li>SAVE: Check all boxes for saving MS OLE objects (right side), uncheck all boxes for loading</li>///
46 '///<li>For other values the subroutine will exit</li>///
50 '///<li>Convert omitted 'sConversionType' to RESET</li>///
51 if IsMissing ( sConversionType ) then
52 sConversionType = "RESET"
54 dim iPosInAuswahl as INTEGER
55 dim iExtraToggle as INTEGER
57 '///<li>Determine value of 'iExtraToggle' for known keys</li>///
58 select case sConversionType
59 case "RESET" : iExtraToggle = 1
60 case "ALL" : iExtraToggle = 2
61 case "LOAD" : iExtraToggle = 3
62 case "SAVE" : iExtraToggle = 4
64 warnlog "Unknown keyword for paramter -> Exit the subroutine"
65 qaErrorLog "Valid keywords are RESET, ALL, LOAD and SAVE!"
69 '///<li>Invoke Tools::Options</li>///
71 '///<li>Go to tabpage Load/Save::Microsoft Office</li>///
72 call hToolsOptions ( "LOADSAVE" , "MICROSOFTOFFICE" )
73 '///<li>Go to top entry in listbox</li>///
74 Auswahl.TypeKeys( "<PageUp>" )
76 '///<li>Toggle (in a tricky way) to a defined state of checkboxes</li>///
77 for iPosInAuswahl = 1 to 4
78 while NOT Auswahl.IsChecked
79 Auswahl.TypeKeys ( "<Space>" )
81 while Auswahl.IsChecked
82 Auswahl.TypeKeys ( "<Space>" )
84 '///<li>Toggle to desired state of boxes</li>///
85 Auswahl.TypeKeys ( "<Space>" , iExtraToggle )
86 '///<li>Go one entry down in list box</li>///
87 Auswahl.TypeKeys ( "<Down>" )
88 '///<li>Loop for all lines</li>///
91 '///<li>Quit dialog</li>///