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 '\*****************************************************************************
37 dim iParentDir as integer
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 "Enter '..' until we are in the filesystem root"
74 for iParentDir = 1 to iDirLevels
76 Dateiname.setText( ".." )
80 sCurrentDir = hGetFirstNameFromFileList()
82 select case iParentDir
83 case 1 : sExpectedDir = "level3"
84 case 2 : sExpectedDir = "level2"
85 case 3 : sExpectedDir = "level1"
86 case 4 : sExpectedDir = "alldocs"
87 case 5 : sExpectedDir = "includes"
88 case 6 : sExpectedDir = "optional"
91 if ( iParentDir < 7 ) then
92 if ( sCurrentDir = sExpectedDir ) then
93 printlog( "Current directory name is: " & sCurrentDir & " [ok]" )
95 warnlog( "Error finding directory name:" )
96 printlog( "Current directory name is: " & sCurrentDir & " which is NOT ok" )
97 printlog( "Expected directory name..: " & sExpectedDir )
104 if ( UebergeordneterOrdner.exists() ) then
106 if ( not UebergeordneterOrdner.isEnabled() ) then
107 printlog( "Level-Up button is disabled, good" )
109 warnlog( "The Level-up button should not be enabled for filesystem root" )
112 warnlog( "Level-Up button does not exist" )