1 'encoding UTF-8 Do not remove or change this line!
2 '*******************************************************************************
4 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 ' Copyright 2000, 2010 Oracle and/or its affiliates.
8 ' OpenOffice.org - a multi-platform office productivity suite
10 ' This file is part of OpenOffice.org.
12 ' OpenOffice.org is free software: you can redistribute it and/or modify
13 ' it under the terms of the GNU Lesser General Public License version 3
14 ' only, as published by the Free Software Foundation.
16 ' OpenOffice.org is distributed in the hope that it will be useful,
17 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ' GNU Lesser General Public License version 3 for more details
20 ' (a copy is included in the LICENSE file that accompanied this code).
22 ' You should have received a copy of the GNU Lesser General Public License
23 ' version 3 along with OpenOffice.org. If not, see
24 ' <http://www.openoffice.org/license.html>
25 ' for a copy of the LGPLv3 License.
27 '/******************************************************************************
29 '* owner : gregor.hartmann@oracle.com
31 '* short description : Remane files dialog
33 '\******************************************************************************
38 cPath = convertpath( gOfficePath & "user/work/" )
41 cFile = "tFileRename.odt"
43 dim iCurrentFile as integer
44 dim cCurrentFile as string
45 dim iFileCount as integer
46 dim bFileFound as boolean : bFileFound = false
49 Printlog( "Rename file dialog" )
51 gApplication = "WRITER"
53 DocumentWriter.typeKeys( "framework/optional/filedlg_dialogtest.bas::tFileRename" )
55 hFileSaveAsKill( cPath & cFile )
59 if ( OeffnenDlg.exists( 2 ) ) then
61 DateiName.setText( cPath )
63 iFileCount = DateiAuswahl.getItemCount()
64 printlog( iFileCount & " files listed" )
65 DateiAuswahl.typeKeys( "<HOME>" )
67 for iCurrentFile = 1 to iFileCount
70 DateiAuswahl.typeKeys( "<SPACE>" )
73 cCurrentFile = DateiAuswahl.getSelText()
74 printlog( " * " & cCurrentFile )
76 if ( cCurrentFile = cFile ) then
77 printlog( "File found" )
78 DateiAuswahl.openContextMenu()
80 DateiAuswahl.typeKeys( "<ESCAPE>" )
87 DateiAuswahl.typeKeys( "<DOWN>" )
93 if ( FileExists( cPath & cFile ) ) then kill( cPath & cFile )