You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/03/05 13:22:41 UTC
svn commit: r1452762 - in /openoffice/trunk/main/l10ntools/inc: export.hxx
l10ntools/directory.hxx l10ntools/file.hxx srciter.hxx
Author: hdu
Date: Tue Mar 5 12:22:40 2013
New Revision: 1452762
URL: http://svn.apache.org/r1452762
Log:
consolidate bytestring helper functors in l10ntools
also replace the "inverted" header guards by their canonical
counterparts to make that possible
Modified:
openoffice/trunk/main/l10ntools/inc/export.hxx
openoffice/trunk/main/l10ntools/inc/l10ntools/directory.hxx
openoffice/trunk/main/l10ntools/inc/l10ntools/file.hxx
openoffice/trunk/main/l10ntools/inc/srciter.hxx
Modified: openoffice/trunk/main/l10ntools/inc/export.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/l10ntools/inc/export.hxx?rev=1452762&r1=1452761&r2=1452762&view=diff
==============================================================================
--- openoffice/trunk/main/l10ntools/inc/export.hxx (original)
+++ openoffice/trunk/main/l10ntools/inc/export.hxx Tue Mar 5 12:22:40 2013
@@ -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;
Modified: openoffice/trunk/main/l10ntools/inc/l10ntools/directory.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/l10ntools/inc/l10ntools/directory.hxx?rev=1452762&r1=1452761&r2=1452762&view=diff
==============================================================================
--- openoffice/trunk/main/l10ntools/inc/l10ntools/directory.hxx (original)
+++ openoffice/trunk/main/l10ntools/inc/l10ntools/directory.hxx Tue Mar 5 12:22:40 2013
@@ -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
+
Modified: openoffice/trunk/main/l10ntools/inc/l10ntools/file.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/l10ntools/inc/l10ntools/file.hxx?rev=1452762&r1=1452761&r2=1452762&view=diff
==============================================================================
--- openoffice/trunk/main/l10ntools/inc/l10ntools/file.hxx (original)
+++ openoffice/trunk/main/l10ntools/inc/l10ntools/file.hxx Tue Mar 5 12:22:40 2013
@@ -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
+
Modified: openoffice/trunk/main/l10ntools/inc/srciter.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/l10ntools/inc/srciter.hxx?rev=1452762&r1=1452761&r2=1452762&view=diff
==============================================================================
--- openoffice/trunk/main/l10ntools/inc/srciter.hxx (original)
+++ openoffice/trunk/main/l10ntools/inc/srciter.hxx Tue Mar 5 12:22:40 2013
@@ -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