Update ooo320-m1
[ooovba.git] / testautomation / spreadsheet / optional / c_import_general.bas
blob7d80f52413fad1730713b726ae7ccbdc86c7afc7
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: c_import_general.bas,v $
11 '* $Revision: 1.1 $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 08:05:48 $
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 : oliver.craemer@sun.com
36 '* short description : Simply load max. 1000 files in .../spreadsheet/required/input/loadsave/
38 '\***********************************************************************
40 global gsSourceDocument(1000) as string
41 global giWhichSecurityLevel as integer
42 global gsSourcePath as string
44 sub main
45 use "spreadsheet\optional\includes\import_general\c_import_general.inc"
47 gsSourcePath = ConvertPath(gTestToolPath + "spreadsheet\optional\input\loadsave\")
48 'Checking in .../common sub-directory if there is a file
49 'to be sure to have access to the files
50 if Dir(gsSourcePath) & "common\" = "" then
51 warnlog "qa:qatesttool:spreadsheet:optional:c_import_general.bas: Unable to find document directory! Please adapt 'gsSourcePath'"
52 exit sub
53 endif
55 Call sPreconditions
56 Call hStatusIn ( "spreadsheet", "c_import_general.bas" )
57 Call tLoadAllDocuments (gsSourcePath)
58 Call hStatusOut
59 Call sResetSystemUnderTest
60 end sub
62 '-------------------------------------------------------------------------------
64 sub LoadIncludeFiles
65 use "global\system\includes\master.inc"
66 use "global\system\includes\gvariabl.inc"
67 Call GetUseFiles
68 gApplication = "CALC"
69 end sub
72 '-------------------------------------------------------------------------------
74 sub sPreconditions
75 'Init the iWhichSecurityLevel() variable with 2
76 'which would be the normal state if it's impossible
77 'to detect the macro security level.
78 giWhichSecurityLevel = 2
79 'Get the macro security level and remember it.
80 'and then set the Macro security level to (0) low
81 giWhichSecurityLevel = hSetMacroSecurity(0)
82 end sub
84 '-------------------------------------------------------------------------------
86 sub sResetSystemUnderTest
87 'Set the macro security level back to the value
88 'which has it before the system was under test
89 call hSetMacroSecurity(giWhichSecurityLevel)
90 end sub
92 '-------------------------------------------------------------------------------