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 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: filedlg_folders1.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
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 : joerg.skottke@sun.com
36 '* short description : check the internal file dialog ( 1. part )
38 '\******************************************************************************
42 '///<h1>Level 1 test: Create new folders from the File Open dialog</h1>
43 Dim VerList(50) as String
44 dim FULLPATH as string
45 FULLPATH = gOfficePath + "user\work\"
48 printlog " - cleanup the output-dir, kill all directories."
50 '///+<li>Delete all directories in [home/Office-dir/user/work]</li>
51 GetDirList ( ConvertPath ( FULLPATH ), "*" , VerList() )
52 KillDirList ( VerList() )
54 '///+<li>Either click on "FileOpen" or use the menu to get there</li>
57 'This is a hack to prevent trouble when opening 'FileOpen' and the path
59 '///+<li>Handle possible errormessages (path not accessible)</li>
61 if Active.Exists( 1 ) then
62 Warnlog "The preset path is invalid, a messagebox has been shown."
66 '///+<li>Insert the pathname into the filename field</li>
68 Dateiname.SetText( ConvertPath ( FULLPATH ) )
72 '///+<li>click on 'new folder', insert as name 'z' and click OK<br>
73 '///+ Verify that the folder was created ( if yes -> kill it )</li>
74 printlog " - foldername with only one character"
75 CreateValidDirectory( "z" )
78 '///<li>click on 'new folder', insert as name '1234' and click OK<br>
79 '///+ Verify that the folder was created ( if yes -> kill it )</li>
80 printlog " - foldername only with numbers"
81 CreateValidDirectory( "1234" )
84 '///+<li>click on 'new folder', insert as name 'xaxaxaxa' ( 8 characters ) and click OK<br>
85 '///+ Verify that the folder was created ( if yes -> kill it )</li>
86 printlog " - foldername with 8 characters"
87 CreateValidDirectory( "xaxaxaxa" )
90 '///+<li>click on 'new folder', insert as name 'yxyxyxyx.aaa' ( 8.3 characters ) and click OK<br>
91 '///+ Verify that the folder was created ( if yes -> kill it )</li>
92 printlog " - foldername with 8.3 characters"
93 CreateValidDirectory( "yxyxyxyx.aaa" )
96 '///+<li>click on 'new folder', insert as name 'yxyxyxyxyxyx.aaabbb' ( more than 8.3 characters ) and click OK<br>
97 '///+ Verify that the folder was created ( if yes -> kill it )</li>
98 printlog " - foldername with more than 8.3 characters"
99 CreateValidDirectory( "yxyxyxyxyxyx.aaabbb" )
102 '///+<li>click on 'new folder', insert as name 'hälölüle' ( with special characters - umlauts ) and click OK<br>
103 '///+ Verify that the folder was created ( if yes -> kill it )</li>
104 printlog " - foldername with special charaters ( umlauts )"
105 CreateValidDirectory( "hälölüle" )
108 '///+<li>click on 'new folder', insert as name 'aa bb' ( with spaces in the middle ) and click OK<br>
109 '///+ Verify that the folder was created ( if yes -> kill it )</li>
110 printlog " - foldername with one whitespace in the middle"
111 CreateValidDirectory( "aa bb" )
114 '///+<li>click on 'new folder', insert as name ' ccdd' ( with leading spaces ) and click OK<br>
115 '///+ Verify that the folder was created ( if yes -> kill it )</li>
116 printlog " - foldername with leading spaces"
117 CreateValidDirectoryCrop( " lead" , "lead" )
120 '///+<li>click on 'new folder', insert as name 'ddee ' ( with spaces at the end ) and click OK<br>
121 '///+ Verify that the folder was created ( if yes -> kill it )</li>
122 printlog " - foldername with trailing spaces"
123 CreateValidDirectoryCrop( "trail " , "trail" )
126 '///+<li>click on 'new folder', insert as name 'Here is a dir with spaces' ( with more spaces ) and click OK<br>
127 '///+ Verify that the folder was created ( if yes -> kill it )</li>
128 printlog " - foldername with more spaces"
129 CreateValidDirectory( "here is a dir with spaces" )
132 '///+<li>click on 'new folder', insert as name '??++!!' ( with forbidden signes on windows ) and click OK<br>
133 '///+ Verify that the folder was created ( if yes -> kill it )</li>
134 printlog " - foldername with forbidden signes ( ?+! ) - only on windows they are forbidden"
135 CreateInvalidDirectory( "??++!!" )
137 '///+<li>Cancel the File Open dialog</li>