2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2001-10-18 10:42:10 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 10:46:12 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
2008-04-10 10:46:12 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
2008-04-10 10:46:12 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
2008-04-10 10:46:12 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
2008-04-10 10:46:12 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
2008-04-10 10:46:12 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-10-18 10:42:10 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _SWUNOHELPER_HXX
|
|
|
|
#define _SWUNOHELPER_HXX
|
|
|
|
|
2007-09-27 07:12:51 +00:00
|
|
|
#include <tools/solar.h>
|
2001-10-18 10:42:10 +00:00
|
|
|
#include <sal/types.h>
|
2004-08-23 07:40:02 +00:00
|
|
|
#include "swdllapi.h"
|
|
|
|
|
2001-10-18 10:42:10 +00:00
|
|
|
namespace com { namespace sun { namespace star {
|
|
|
|
namespace uno {
|
|
|
|
class Any;
|
|
|
|
}
|
2007-09-27 07:12:51 +00:00
|
|
|
}}}
|
2001-10-18 10:42:10 +00:00
|
|
|
|
|
|
|
class String;
|
|
|
|
class SvStrings;
|
2004-09-20 12:04:20 +00:00
|
|
|
class SvPtrarr;
|
2001-10-18 10:42:10 +00:00
|
|
|
|
|
|
|
namespace SWUnoHelper {
|
|
|
|
|
|
|
|
// calls over the compherl the getEnumAsInt32 function and handle the
|
|
|
|
// exceptions.
|
|
|
|
sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
|
|
|
|
|
|
|
|
|
|
|
|
// methods for UCB actions:
|
|
|
|
// delete the file under this URL
|
2011-01-17 15:06:54 +01:00
|
|
|
SW_DLLPUBLIC sal_Bool UCB_DeleteFile( const String& rURL );
|
2001-10-18 10:42:10 +00:00
|
|
|
|
|
|
|
// copy/move the file to a new location
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool UCB_CopyFile( const String& rURL, const String& rNewURL,
|
|
|
|
sal_Bool bCopyIsMove = sal_False );
|
2001-10-18 10:42:10 +00:00
|
|
|
|
|
|
|
// is the URL on the current system case sentive?
|
2011-01-17 15:06:54 +01:00
|
|
|
SW_DLLPUBLIC sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL );
|
2001-10-18 10:42:10 +00:00
|
|
|
|
|
|
|
// is the URL readonly?
|
2011-01-17 15:06:54 +01:00
|
|
|
SW_DLLPUBLIC sal_Bool UCB_IsReadOnlyFileName( const String& rURL );
|
2001-10-18 10:42:10 +00:00
|
|
|
|
|
|
|
// get a list of files from the folder of the URL
|
|
|
|
// options: pExtension = 0 -> all, else this specific extension
|
|
|
|
// pDateTime != 0 -> returns also the modified date/time of
|
|
|
|
// the files in a SvPtrarr -->
|
|
|
|
// !! objects must be deleted from the caller!!
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
|
2001-10-18 10:42:10 +00:00
|
|
|
const String* pExtension = 0,
|
|
|
|
SvPtrarr* pDateTimeList = 0 );
|
2003-03-27 14:45:43 +00:00
|
|
|
|
2004-09-24 15:13:36 +00:00
|
|
|
// is the URL an existing file?
|
2011-01-17 15:06:54 +01:00
|
|
|
SW_DLLPUBLIC sal_Bool UCB_IsFile( const String& rURL );
|
2004-09-24 15:13:36 +00:00
|
|
|
|
2003-03-27 14:45:43 +00:00
|
|
|
// is the URL a existing directory?
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool UCB_IsDirectory( const String& rURL );
|
2001-10-18 10:42:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:30:41 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|