diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-08-03 02:19:05 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-08-03 02:19:05 +0200 |
commit | 809b8bbf8ab62956674bb0d01e6d1ae98ce5da58 (patch) | |
tree | 3228a111a105c0515a0c466bd591a0ddd413ef59 /l10ntools | |
parent | ae0c770c9f617c41cedfc653fc8d56deaefdd673 (diff) |
callcatcher: remove unused methods and a little cleanup
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/help/HelpCompiler.cxx | 53 | ||||
-rw-r--r-- | l10ntools/source/help/HelpCompiler.hxx | 57 |
2 files changed, 0 insertions, 110 deletions
diff --git a/l10ntools/source/help/HelpCompiler.cxx b/l10ntools/source/help/HelpCompiler.cxx index a3f2cd193a19..d3e5760a1fdd 100644 --- a/l10ntools/source/help/HelpCompiler.cxx +++ b/l10ntools/source/help/HelpCompiler.cxx @@ -517,63 +517,10 @@ namespace fs osl::Directory::createPath(indexDirName.data); } - void rename(const fs::path &src, const fs::path &dest) - { - osl::File::move(src.data, dest.data); - } - void copy(const fs::path &src, const fs::path &dest) { osl::File::copy(src.data, dest.data); } - - bool exists(const fs::path &in) - { - osl::File tmp(in.data); - return (tmp.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None); - } - - void remove(const fs::path &in) - { - osl::File::remove(in.data); - } - - void removeRecursive(rtl::OUString const& _suDirURL) - { - { - osl::Directory aDir(_suDirURL); - aDir.open(); - if (aDir.isOpen()) - { - osl::DirectoryItem aItem; - osl::FileStatus aStatus(osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_Attributes); - while (aDir.getNextItem(aItem) == ::osl::FileBase::E_None) - { - if (osl::FileBase::E_None == aItem.getFileStatus(aStatus) && - aStatus.isValid(osl_FileStatus_Mask_FileName | osl_FileStatus_Mask_Attributes)) - { - rtl::OUString suFilename = aStatus.getFileName(); - rtl::OUString suFullFileURL; - suFullFileURL += _suDirURL; - suFullFileURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - suFullFileURL += suFilename; - - if (aStatus.getFileType() == osl::FileStatus::Directory) - removeRecursive(suFullFileURL); - else - osl::File::remove(suFullFileURL); - } - } - aDir.close(); - } - } - osl::Directory::remove(_suDirURL); - } - - void remove_all(const fs::path &in) - { - removeRecursive(in.data); - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx index 80fc692c0bf2..b2e061cc3825 100644 --- a/l10ntools/source/help/HelpCompiler.hxx +++ b/l10ntools/source/help/HelpCompiler.hxx @@ -60,8 +60,6 @@ #include <compilehelp.hxx> -#define EMULATEORIGINAL 1 - #if OSL_DEBUG_LEVEL > 2 #define HCDBG(foo) do { if (1) foo; } while(0) #else @@ -141,11 +139,7 @@ namespace fs }; void create_directory(const fs::path indexDirName); - void rename(const fs::path &src, const fs::path &dest); void copy(const fs::path &src, const fs::path &dest); - bool exists(const fs::path &in); - void remove_all(const fs::path &in); - void remove(const fs::path &in); } struct joaat_hash @@ -170,57 +164,6 @@ struct joaat_hash #define get16bits(d) ((((sal_uInt32)(((const sal_uInt8 *)(d))[1])) << 8)\ +(sal_uInt32)(((const sal_uInt8 *)(d))[0]) ) -struct SuperFastHash -{ - size_t operator()(const std::string &str) const - { - const char * data = str.data(); - int len = str.size(); - size_t hash = len, tmp; - if (len <= 0 || data == NULL) return 0; - - int rem = len & 3; - len >>= 2; - - /* Main loop */ - for (;len > 0; len--) - { - hash += get16bits (data); - tmp = (get16bits (data+2) << 11) ^ hash; - hash = (hash << 16) ^ tmp; - data += 2*sizeof (sal_uInt16); - hash += hash >> 11; - } - - /* Handle end cases */ - switch (rem) - { - case 3: hash += get16bits (data); - hash ^= hash << 16; - hash ^= data[sizeof (sal_uInt16)] << 18; - hash += hash >> 11; - break; - case 2: hash += get16bits (data); - hash ^= hash << 11; - hash += hash >> 17; - break; - case 1: hash += *data; - hash ^= hash << 10; - hash += hash >> 1; - } - - /* Force "avalanching" of final 127 bits */ - hash ^= hash << 3; - hash += hash >> 5; - hash ^= hash << 4; - hash += hash >> 17; - hash ^= hash << 25; - hash += hash >> 6; - - return hash; - } -}; - #define pref_hash joaat_hash typedef boost::unordered_map<std::string, std::string, pref_hash> Stringtable; |