Kaydet (Commit) 59a06b50 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

Remove unused inc files

üst 9d393c9b
'encoding UTF-8 Do not remove or change this line!
'*******************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org. If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/******************************************************************************
'*
'* owner : joerg.skottke@oracle.com
'*
'* short description : Test VBA compatibility switches
'*
'\******************************************************************************
testcase tBasicVBACompatSecurityCheck()
printlog( "Test VBA Security feature" )
printlog( "VBA macros may not ignore global macro security setting" )
' This test case is based on the use cases provided in issue #i109699
const IMPORT_EXCEL_MACROS = TRUE
const EXEC_EXCEL_MACROS = TRUE
const MACRO_IDENTIFICATION_MESSAGE = "Clicked"
const MACRO_NAME = "CommandButton1_Click"
const WORK_FILE = "framework/optional/input/vba-compat/Book1.xls"
dim cTestFile as string : cTestFile = gTesttoolPath & WORK_FILE
dim iSecurityLevel as integer
printlog( "Set VBA macro handling to import and execute" )
hSetExcelBasicImportMode( IMPORT_EXCEL_MACROS, EXEC_EXCEL_MACROS )
for iSecurityLevel = GC_MACRO_SECURITY_LEVEL_MEDIUM to GC_MACRO_SECURITY_LEVEL_VERYHIGH
printlog( "Adjust security level" )
hSetMacroSecurityAPI( iSecurityLevel )
printlog( "Load the test file" )
hFileOpen( cTestFile )
printlog( "Deny macro execution or close macros blocked message" )
if ( iSecurityLevel = GC_MACRO_SECURITY_LEVEL_MEDIUM ) then
hDenyMacroExecution()
else
kontext "Active"
Active.ok()
endif
printlog( "Try to execute macro via macro organizer" )
hMacroOrganizerRunMacro( MACRO_NAME )
printlog( "Probe for warning message (or macro)" )
kontext "Active"
if ( Active.exists( 2 ) ) then
if ( Active.getText() = MACRO_IDENTIFICATION_MESSAGE ) then
warnlog( "Macro was executed though macro execution has been denied" )
Active.ok()
else
printlog( "Macro execution blocked - warning is displayed." )
Active.ok()
endif
else
warnlog( "No warning message for blocked macro execution" )
endif
' recover silently, the warnings above should say it all.
kontext "Makro"
if ( Makro.exists() ) then Makro.cancel()
printlog( "Close file" )
hDestroyDocument()
next iSecurityLevel
printlog( "Reset VBA import options to default" )
hSetExcelImportModeDefault()
printlog( "Reset macro security level to default" )
hSetMacroSecurityAPI( GC_MACRO_SECURITY_LEVEL_DEFAULT )
endcase
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org. If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/************************************************************************
'*
'* owner : joerg.skottke@oracle.com
'*
'* short description : check the internal file dialog ( extended tests )
'*
'\******************************************************************************
testcase tCJKFolders()
if ( not hTestLocale() ) then
warnlog( "Test requires UTF-8 locale" )
goto endsub
endif
dim cStrangeFolder as string
dim cStrangeFile as string
dim iCounter as integer ' iterator
dim iRandom as long ' random number.(needs long for cjk chars)
dim brc as boolean
printlog( CHR$(13) )
printlog( "Check if CJK-files/folders are handled ok" )
printlog( CHR$(13) )
printlog( "Open a new document" )
brc = hCreateDocument()
printlog( CHR$(13) + "Names with CJK-chars" )
printlog( "" )
call randomize()
for iCounter = 1 to 3
iRandom = int( 19968 + ( 20911 * rnd ) )
printlog( " * Using decimal char: " & iRandom )
cStrangeFolder = hNameGen_append( iRandom )
brc = hCreateDirctoryExpectSuccess( cStrangeFolder )
cStrangeFile = hNameGen_append( iRandom )
cStrangeFile = convertpath( cStrangeFolder & "\" & cStrangeFile )
brc = hSaveLoadDelSuccess( cStrangeFile , TRUE )
cStrangeFile = hNameGen_lead( iRandom , true )
cStrangeFile = convertpath( cStrangeFolder & "\" & cStrangeFile )
brc = hSaveLoadDelSuccess( cStrangeName , true )
brc = hDeleteFileExpectSuccess( cStrangeFolder )
next iCounter
printlog( "Close the document" )
brc = hDestroyDocument()
endcase
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org. If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/************************************************************************
'*
'* owner : thorsten.bosbach@oracle.com
'*
'* short description : general option test ( datasource - group )
'*
'\******************************************************************************
testcase tDatasourceConnections
Dim lsTimeout ( 20 ) as String
Dim lbPool ( 20 ) as Boolean
Dim i as Integer, iCounter as Integer
Dim bSave as Boolean
Dim sDiv as String
Dim iDummy as Single
iCounter = 9 ' sorry only hard coded the number of entries, it gives no way to get the real count ( GetText crashes )
qaerrorLog "GetTextCrasjhes??? TBO"
hNewDocument
ToolsOptions
hToolsOptions ( "Datasources", "Connections" )
printlog " - save raw data"
bSave = ConnectionPoolingEnabled.IsChecked
ConnectionPoolingEnabled.Check
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
lbPool (i) = EnablePoolingForThisDriver.IsChecked
if lbPool (i) = TRUE then
lsTimeout (i) = Timeout.GetText
else
EnablePoolingForThisDriver.Check
lsTimeout (i) = Timeout.GetText
end if
next i
printlog " - change all settings"
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
sDiv = str ( i/2 )
if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
EnablePoolingForThisDriver.Check
Timeout.SetText "4" + i
else
EnablePoolingForThisDriver.Uncheck
end if
Sleep (1)
next i
if bSave = TRUE then ConnectionPoolingEnabled.UnCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
hCloseDocument
printlog " - exit/restart StarOffice"
ExitRestartTheOffice
printlog " - check all changes"
ToolsOptions
hToolsOptions ( "Datasources", "Connections" )
if ConnectionPoolingEnabled.IsChecked = bSave then Warnlog "Connection pooling enabled => changes not saved!"
ConnectionPoolingEnabled.Check
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
sDiv = str ( i/2 )
if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
if EnablePoolingForThisDriver.IsChecked <> TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
EnablePoolingForThisDriver.Check
if Timeout.GetText <> "4" + i then Warnlog "Entry " + i + " : timeout => changes not saved!"
else
if EnablePoolingForThisDriver.Ischecked = TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
end if
Sleep (1)
next i
printlog " - make second changes"
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
sDiv = str ( i/2 )
if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
EnablePoolingForThisDriver.Uncheck
else
EnablePoolingForThisDriver.Check
if i<>10 then
Timeout.SetText "6" + i
else
Timeout.SetText "540"
end if
end if
Sleep (1)
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check all changes"
ToolsOptions
hToolsOptions ( "Datasources", "Connections" )
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
sDiv = str ( i/2 )
if Instr ( sDiv, "." ) <> 0 or Instr ( sDiv, "," ) <> 0 then
if EnablePoolingForThisDriver.Ischecked = TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
else
if EnablePoolingForThisDriver.IsChecked <> TRUE then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
EnablePoolingForThisDriver.Check
if i<>10 then
if Timeout.GetText <> "6" + i then Warnlog "Entry " + i + " : timeout => changes not saved!"
else
if Timeout.GetText <> "540" then Warnlog "Entry " + i + " : timeout => changes not saved!"
end if
end if
Sleep (1)
next i
printlog " - reset all settings"
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
EnablePoolingForThisDriver.Check
Timeout.SetText lsTimeout (i)
if lbPool (i) = TRUE then EnablePoolingForThisDriver.Check else EnablePoolingForThisDriver.UnCheck
next i
if bSave = TRUE then ConnectionPoolingEnabled.Check else ConnectionPoolingEnabled.UnCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check the raw data"
ToolsOptions
hToolsOptions ( "Datasources", "Connections" )
ConnectionPoolingEnabled.check
DriverList.TypeKeys "<Up>", 20
for i=1 to iCounter
if i <> 1 then DriverList.TypeKeys "<Down>"
if EnablePoolingForThisDriver.IsChecked <> lbPool (i) then Warnlog "Entry " + i + " : enable pooling for this driver => changes not saved!"
EnablePoolingForThisDriver.Check
if Timeout.GetText <> lsTimeout (i) then Warnlog "Entry " + i + " : timeout => changes not saved!"
if lbPool (i) = TRUE then EnablePoolingForThisDriver.Check else EnablePoolingForThisDriver.UnCheck
Sleep (1)
next i
ConnectionPoolingEnabled.unCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
endcase
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment