update dev300-m58
[ooovba.git] / sw / inc / swunohelper.hxx
blobf55d181df5cfe5787ea15feda08d935f84323d00
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swunohelper.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWUNOHELPER_HXX
31 #define _SWUNOHELPER_HXX
33 #include <tools/solar.h>
34 #include <sal/types.h>
35 #include "swdllapi.h"
37 namespace com { namespace sun { namespace star {
38 namespace uno {
39 class Any;
41 }}}
43 class String;
44 class SvStrings;
45 class SvPtrarr;
47 namespace SWUnoHelper {
49 // calls over the compherl the getEnumAsInt32 function and handle the
50 // exceptions.
51 sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
54 // methods for UCB actions:
55 // delete the file under this URL
56 SW_DLLPUBLIC BOOL UCB_DeleteFile( const String& rURL );
58 // copy/move the file to a new location
59 BOOL UCB_CopyFile( const String& rURL, const String& rNewURL,
60 BOOL bCopyIsMove = FALSE );
62 // is the URL on the current system case sentive?
63 SW_DLLPUBLIC BOOL UCB_IsCaseSensitiveFileName( const String& rURL );
65 // is the URL readonly?
66 SW_DLLPUBLIC BOOL UCB_IsReadOnlyFileName( const String& rURL );
68 // get a list of files from the folder of the URL
69 // options: pExtension = 0 -> all, else this specific extension
70 // pDateTime != 0 -> returns also the modified date/time of
71 // the files in a SvPtrarr -->
72 // !! objects must be deleted from the caller!!
73 BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
74 const String* pExtension = 0,
75 SvPtrarr* pDateTimeList = 0 );
77 // is the URL an existing file?
78 SW_DLLPUBLIC BOOL UCB_IsFile( const String& rURL );
80 // is the URL a existing directory?
81 BOOL UCB_IsDirectory( const String& rURL );
84 #endif