'encoding UTF-8 Do not remove or change this line!
'*************************************************************************
'
' Licensed to the Apache Software Foundation (ASF) under one
' or more contributor license agreements. See the NOTICE file
' distributed with this work for additional information
' regarding copyright ownership. The ASF licenses this file
' to you under the Apache License, Version 2.0 (the
' "License"); you may not use this file except in compliance
' with the License. You may obtain a copy of the License at
'
' http://www.apache.org/licenses/LICENSE-2.0
'
' Unless required by applicable law or agreed to in writing,
' software distributed under the License is distributed on an
' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
' KIND, either express or implied. See the License for the
' specific language governing permissions and limitations
' under the License.
'
'*************************************************************************
'*
'* short description : Tools for Tools::Options dialog
'*
'************************************************************************
'*
' #1 subSetConversionMicrosoftOLE
'*
'\***********************************************************************
sub subSetConversionMicrosoftOLE ( OPTIONAL sConversionType as STRING )
'///Routine to adjust the behaviour of Tools::Options::Load/Save::Microsoft Office///
'///Possible Keys for 'sConversionType' are:///
'///
'///- RESET (or omitted): Uncheck all boxes (default in a freshly installed OOo))
///
'///- ALL: Check all boxes
///
'///- LOAD: Check all boxes for loading MS OLE objects (left side), uncheck all boxes for saving
///
'///- SAVE: Check all boxes for saving MS OLE objects (right side), uncheck all boxes for loading
///
'///- For other values the subroutine will exit
///
'///
'///Action:///
'///
'///- Convert omitted 'sConversionType' to RESET
///
if IsMissing ( sConversionType ) then
sConversionType = "RESET"
end if
dim iPosInAuswahl as INTEGER
dim iExtraToggle as INTEGER
'///- Determine value of 'iExtraToggle' for known keys
///
select case sConversionType
case "RESET" : iExtraToggle = 1
case "ALL" : iExtraToggle = 2
case "LOAD" : iExtraToggle = 3
case "SAVE" : iExtraToggle = 4
case else
warnlog "Unknown keyword for paramter -> Exit the subroutine"
qaErrorLog "Valid keywords are RESET, ALL, LOAD and SAVE!"
exit sub
end select
'///- Invoke Tools::Options
///
ToolsOptions
'///- Go to tabpage Load/Save::Microsoft Office
///
call hToolsOptions ( "LOADSAVE" , "MICROSOFTOFFICE" )
'///- Go to top entry in listbox
///
Auswahl.TypeKeys( "" )
'///- Toggle (in a tricky way) to a defined state of checkboxes
///
for iPosInAuswahl = 1 to 4
while NOT Auswahl.IsChecked
Auswahl.TypeKeys ( "" )
wend
while Auswahl.IsChecked
Auswahl.TypeKeys ( "" )
wend
'///- Toggle to desired state of boxes
///
Auswahl.TypeKeys ( "" , iExtraToggle )
'///- Go one entry down in list box
///
Auswahl.TypeKeys ( "" )
'///- Loop for all lines
///
next iPosInAuswahl
'///- Quit dialog
///
Kontext "OptionenDLG"
OptionenDLG.Ok
'///
end sub