1 /*************************************************************************
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 ************************************************************************/
27 #ifndef _SWUNOHELPER_HXX
28 #define _SWUNOHELPER_HXX
30 #include <tools/solar.h>
31 #include <sal/types.h>
34 namespace com
{ namespace sun
{ namespace star
{
44 namespace SWUnoHelper
{
46 // calls over the compherl the getEnumAsInt32 function and handle the
48 sal_Int32
GetEnumAsInt32( const com::sun::star::uno::Any
& rVal
);
51 // methods for UCB actions:
52 // delete the file under this URL
53 SW_DLLPUBLIC BOOL
UCB_DeleteFile( const String
& rURL
);
55 // copy/move the file to a new location
56 BOOL
UCB_CopyFile( const String
& rURL
, const String
& rNewURL
,
57 BOOL bCopyIsMove
= FALSE
);
59 // is the URL on the current system case sentive?
60 SW_DLLPUBLIC BOOL
UCB_IsCaseSensitiveFileName( const String
& rURL
);
62 // is the URL readonly?
63 SW_DLLPUBLIC BOOL
UCB_IsReadOnlyFileName( const String
& rURL
);
65 // get a list of files from the folder of the URL
66 // options: pExtension = 0 -> all, else this specific extension
67 // pDateTime != 0 -> returns also the modified date/time of
68 // the files in a SvPtrarr -->
69 // !! objects must be deleted from the caller!!
70 BOOL
UCB_GetFileListOfFolder( const String
& rURL
, SvStrings
& rList
,
71 const String
* pExtension
= 0,
72 SvPtrarr
* pDateTimeList
= 0 );
74 // is the URL an existing file?
75 SW_DLLPUBLIC BOOL
UCB_IsFile( const String
& rURL
);
77 // is the URL a existing directory?
78 BOOL
UCB_IsDirectory( const String
& rURL
);