diff options
author | Herbert Dürr <hdu@apache.org> | 2013-03-05 11:22:40 +0000 |
---|---|---|
committer | Herbert Dürr <hdu@apache.org> | 2013-03-05 11:22:40 +0000 |
commit | ef84b27a141da728614ddc484049be1573cec157 (patch) | |
tree | ef9542094751155162bc0593ad50098b398d21f0 | |
parent | e86a7b8c14e605bc08b02042117670ce6e451afe (diff) |
consolidate bytestring helper functors in l10ntools
also replace the "inverted" header guards by their canonical
counterparts to make that possible
Notes
Notes:
prefer: 1f26095e9c4f72f7bd6e78416c409f68ceae3027
-rw-r--r-- | l10ntools/inc/export.hxx | 29 | ||||
-rw-r--r-- | l10ntools/inc/l10ntools/directory.hxx | 9 | ||||
-rw-r--r-- | l10ntools/inc/l10ntools/file.hxx | 6 | ||||
-rw-r--r-- | l10ntools/inc/srciter.hxx | 7 |
4 files changed, 16 insertions, 35 deletions
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index 67c6655f0b5e..1dc282f0355a 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -24,11 +24,9 @@ #ifndef _EXPORT_HXX #define _EXPORT_HXX -#ifndef L10NTOOLS_DIRECTORY_HXX -#define L10NTOOLS_DIRECTORY_HXX #include <l10ntools/directory.hxx> -#endif +#include <tagtest.hxx> // #define MERGE_SOURCE_LANGUAGES <- To merge en-US and de resource @@ -55,31 +53,6 @@ #define JAPANESE_ISO "ja" - -struct eqstr{ - sal_Bool operator()(const char* s1, const char* s2) const{ - return strcmp(s1,s2)==0; - } -}; - -struct equalByteString{ - bool operator()( const ByteString& rKey1, const ByteString& rKey2 ) const { - return rKey1.CompareTo( rKey2 )==COMPARE_EQUAL; - } -}; -struct lessByteString{ - bool operator()( const ByteString& rKey1, const ByteString& rKey2 ) const { - return rKey1.CompareTo( rKey2 )==COMPARE_LESS; - } -}; - -struct hashByteString{ - size_t operator()( const ByteString& rName ) const{ - std::hash< const char* > myHash; - return myHash( rName.GetBuffer() ); - } -}; - class PFormEntrys; class MergeData; typedef std::set<ByteString , lessByteString > ByteStringSet; diff --git a/l10ntools/inc/l10ntools/directory.hxx b/l10ntools/inc/l10ntools/directory.hxx index 3b22f2b3a54d..23281c5de36a 100644 --- a/l10ntools/inc/l10ntools/directory.hxx +++ b/l10ntools/inc/l10ntools/directory.hxx @@ -19,6 +19,9 @@ * *************************************************************/ +#ifndef L10NTOOLS_DIRECTORY_HXX +#define L10NTOOLS_DIRECTORY_HXX + #include <vector> #include <algorithm> #include <rtl/ustring.hxx> @@ -33,10 +36,7 @@ #include <stdio.h> -#ifndef L10NTOOLS_FILE_HXX -#define L10NTOOLS_FILE_HXX #include <l10ntools/file.hxx> -#endif namespace transex{ @@ -73,3 +73,6 @@ class Directory }; } + +#endif // L10NTOOLS_DIRECTORY_HXX + diff --git a/l10ntools/inc/l10ntools/file.hxx b/l10ntools/inc/l10ntools/file.hxx index 3e2760bbf201..9156c54c59b0 100644 --- a/l10ntools/inc/l10ntools/file.hxx +++ b/l10ntools/inc/l10ntools/file.hxx @@ -19,6 +19,9 @@ * *************************************************************/ +#ifndef L10NTOOLS_FILE_HXX +#define L10NTOOLS_FILE_HXX + #include "rtl/ustring.hxx" namespace transex @@ -42,3 +45,6 @@ class File }; } + +#endif // L10NTOOLS_FILE_HXX + diff --git a/l10ntools/inc/srciter.hxx b/l10ntools/inc/srciter.hxx index 37ba96e332a7..2ec6c283e592 100644 --- a/l10ntools/inc/srciter.hxx +++ b/l10ntools/inc/srciter.hxx @@ -20,14 +20,12 @@ *************************************************************/ +#ifndef L10NTOOLS_SRCITER_HXX +#define L10NTOOLS_SRCITER_HXX -#ifndef L10NTOOLS_DIRECTORY_HXX -#define L10NTOOLS_DIRECTORY_HXX #include <l10ntools/directory.hxx> -#endif // class SourceTreeIterator -// class SourceTreeIterator { @@ -51,4 +49,5 @@ public: virtual void OnExecuteDirectory( const rtl::OUString &rDirectory ); }; +#endif // L10NTOOLS_SRCITER_HXX |