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