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 : gregor.hartmann@oracle.com
30 '* short description : check the internal file dialog ( 1. part )
32 '\*****************************************************************************
39 ' We always want to start in a fixed directory structure so the first few dirnames are
40 ' known an can be used for verification
41 dim cStartDir as string
42 cStartDir = gTesttoolPath & "framework\optional\input\filetest\level1\level2\level3"
43 cStartDir = convertpath( cStartDir )
44 printlog( "Start-Directory is: " & cStartDir )
47 ' Find out how deep into the filesystem hierarchy we are so we know when we are at the
48 ' filesystem root. We add one because Windows has one more level where the drive icons
50 dim iDirLevels as integer
51 iDirLevels = hGetDirTreeLevel( cStartDir )
53 if ( instr( lcase( gtSYSName ) , "win" ) = 1 ) then
54 iDirLevels = iDirLevels + 1
55 printlog( "Current threshold (Windows) is: " & iDirLevels)
56 elseif ( gtSysName = "ecomstation" ) then
57 iDirLevels = iDirLevels + 1
58 printlog( "Current threshold (eComStation) is: " & iDirLevels)
60 printlog( "Current threshold (Unix/Linux) is: " & iDirLevels)
63 dim sCurrentDir as string
64 dim sExpectedDir as string
70 Dateiname.SetText( cStartDir )
73 printlog "Click the Level-Up button until we are in the filesystem root"
74 for iClick = 1 to iDirLevels
76 if ( UebergeordneterOrdner.exists() ) then
78 if ( UebergeordneterOrdner.isEnabled() ) then
80 UebergeordneterOrdner.Click()
82 warnlog( "Level-Up button is disabled" )
85 warnlog( "Level-Up button does not exist" )
88 sCurrentDir = hGetFirstNameFromFileList()
91 case 1 : sExpectedDir = "level3"
92 case 2 : sExpectedDir = "level2"
93 case 3 : sExpectedDir = "level1"
94 case 4 : sExpectedDir = "alldocs"
95 case 5 : sExpectedDir = "includes"
96 case 6 : sExpectedDir = "optional"
99 if ( iClick < 7 ) then
100 if ( sCurrentDir = sExpectedDir ) then
101 printlog( "Current directory name is: " & sCurrentDir & " [ok]" )
103 warnlog( "Error finding directory name:" )
104 printlog( "Current directory name is: " & sCurrentDir & " which is NOT ok" )
105 printlog( "Expected directory name..: " & sExpectedDir )
112 if ( UebergeordneterOrdner.exists() ) then
114 if ( not UebergeordneterOrdner.isEnabled() ) then
115 printlog( "Level-Up button is disabled, good" )
117 warnlog( "The Level-up button should not be enabled for filesystem root" )
120 warnlog( "Level-Up button does not exist" )