xref: /aoo41x/main/sfx2/source/inc/helper.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 #ifndef _SFX_HELPER_HXX
28 #define _SFX_HELPER_HXX
29 
30 // include ---------------------------------------------------------------
31 
32 #include <com/sun/star/uno/Sequence.hxx>
33 #include <com/sun/star/ucb/NameClash.hpp>
34 
35 #include <tools/string.hxx>
36 #include <tools/errcode.hxx>
37 #include <tools/bigint.hxx>
38 
39 // class SfxContentHelper ------------------------------------------------
40 
41 class SfxContentHelper
42 {
43 private:
44     static sal_Bool             Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData,
45                                                     sal_Int32 nNameClash );
46 
47 public:
48 	static sal_Bool				IsDocument( const String& rContent );
49 	static sal_Bool				IsFolder( const String& rContent );
50 	static sal_Bool				GetTitle( const String& rContent, String& rTitle );
51 	static sal_Bool				Kill( const String& rContent );
52 
53 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
54                                 GetFolderContents( const String& rFolder, sal_Bool bFolder, sal_Bool bSorted = sal_False );
55 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
56 								GetFolderContentProperties( const String& rFolder, sal_Bool bFolder );
57 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
58 								GetResultSet( const String& rURL );
59 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
60 								GetHelpTreeViewContents( const String& rURL );
61 	static String				GetActiveHelpString( const String& rURL );
62 	static sal_Bool				IsHelpErrorDocument( const String& rURL );
63 
64 	static sal_Bool				CopyTo( const String& rSource, const String& rDest );
65     static sal_Bool             MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash = com::sun::star::ucb::NameClash::ERROR );
66 
67 	static sal_Bool				MakeFolder( const String& rFolder );
68 	static ErrCode				QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
69 	static sal_uIntPtr				GetSize( const String& rContent );
70 
71 	// please don't use this!
72 	static sal_Bool				Exists( const String& rContent );
73 	static sal_Bool				Find( const String& rFolder, const String& rName, String& rFile );
74 };
75 
76 #endif // #ifndef _SFX_HELPER_HXX
77 
78 
79