xref: /aoo42x/main/sfx2/source/inc/helper.hxx (revision 353d8f4d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SFX_HELPER_HXX
24 #define _SFX_HELPER_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <com/sun/star/uno/Sequence.hxx>
29 #include <com/sun/star/ucb/NameClash.hpp>
30 
31 #include <tools/string.hxx>
32 #include <tools/errcode.hxx>
33 #include <tools/bigint.hxx>
34 
35 // class SfxContentHelper ------------------------------------------------
36 
37 class SfxContentHelper
38 {
39 private:
40     static sal_Bool             Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData,
41                                                     sal_Int32 nNameClash );
42 
43 public:
44 	static sal_Bool				IsDocument( const String& rContent );
45 	static sal_Bool				IsFolder( const String& rContent );
46 	static sal_Bool				GetTitle( const String& rContent, String& rTitle );
47 	static sal_Bool				Kill( const String& rContent );
48 
49 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
50                                 GetFolderContents( const String& rFolder, sal_Bool bFolder, sal_Bool bSorted = sal_False );
51 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
52 								GetFolderContentProperties( const String& rFolder, sal_Bool bFolder );
53 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
54 								GetResultSet( const String& rURL );
55 	static ::com::sun::star::uno::Sequence< ::rtl::OUString >
56 								GetHelpTreeViewContents( const String& rURL );
57 	static String				GetActiveHelpString( const String& rURL );
58 	static sal_Bool				IsHelpErrorDocument( const String& rURL );
59 
60 	static sal_Bool				CopyTo( const String& rSource, const String& rDest );
61     static sal_Bool             MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash = com::sun::star::ucb::NameClash::ERROR );
62 
63 	static sal_Bool				MakeFolder( const String& rFolder );
64 	static ErrCode				QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
65 	static sal_uIntPtr				GetSize( const String& rContent );
66 
67 	// please don't use this!
68 	static sal_Bool				Exists( const String& rContent );
69 	static sal_Bool				Find( const String& rFolder, const String& rName, String& rFile );
70 };
71 
72 #endif // #ifndef _SFX_HELPER_HXX
73 
74 
75