summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-08-03 02:19:05 +0200
committerThomas Arnhold <thomas@arnhold.org>2011-08-03 02:19:05 +0200
commitfe4cbca9a788bb34313a2797b578240246f489ff (patch)
treea86f21a67885d1c54a91aa57dfb3b647b3603f64
parent6abd27de9203a7bac73a32c27ef01760697fe2bd (diff)
callcatcher: remove unused methods and a little cleanup
-rw-r--r--l10ntools/source/help/HelpCompiler.cxx53
-rw-r--r--l10ntools/source/help/HelpCompiler.hxx57
2 files changed, 0 insertions, 110 deletions
diff --git a/l10ntools/source/help/HelpCompiler.cxx b/l10ntools/source/help/HelpCompiler.cxx
index 0c492b1195..0c20993527 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 215a8eb0ae..dd10cc0ace 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;