[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - l10ntools/inc l10ntools/source sw/source

Herbert Dürr hdu at apache.org
Mon Mar 4 17:11:46 PST 2013


 l10ntools/inc/tagtest.hxx        |    4 ++--
 l10ntools/source/export2.cxx     |    9 ++-------
 sw/source/filter/ww8/ww8par6.cxx |    4 ++--
 3 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit e74fe471bd79a0da0afbb564746e126a6978e09b
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Mar 4 17:26:44 2013 +0000

    the hash specialization for c-strings was specific to stlport<=4 \!\!\!

diff --git a/l10ntools/inc/tagtest.hxx b/l10ntools/inc/tagtest.hxx
index 9b0d6ff..9d0e14a 100644
--- a/l10ntools/inc/tagtest.hxx
+++ b/l10ntools/inc/tagtest.hxx
@@ -27,6 +27,7 @@
 #include <tools/string.hxx>
 #include <tools/list.hxx>
 #include <hash_map> /* std::hashmap*/
+#include <rtl/string.h>
 
 class GSILine;
 
@@ -53,8 +54,7 @@ struct lessByteString{
 
 struct hashByteString{
     size_t operator()( const ByteString& rName ) const{
-                std::hash< const char* > myHash;
-                return myHash( rName.GetBuffer() );
+        return rtl_str_hashCode_WithLength( rName.GetBuffer(), rName.Len());
     }
 };
 
commit faf46e490de7666be1063d83c763c474af331618
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Mar 4 13:20:14 2013 +0000

    WaE: fix narrowing conversion for systems with signed char

diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index adf7934..34df550 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -263,13 +263,8 @@ void Export::RemoveUTF8ByteOrderMarker( ByteString &rString ){
 }
 
 bool Export::hasUTF8ByteOrderMarker( const ByteString &rString ){
-    // Byte order marker signature
-
-    const unsigned char c1 =  0xEF;
-    const unsigned char c2 =  0xBB;
-    const unsigned char c3 =  0xBF;
-
-    const char bom[ 3 ] = { c1 , c2 , c3 };
+    // UTF-8 BOM: Byte order marker signature
+    static const unsigned char bom[3] = { 0xEF, 0xBB, 0xBF };
 
     return      rString.Len() >= 3 &&
                 rString.GetChar( 0 ) == bom[ 0 ] &&
commit 267c782fe32afac7ba679dbd98f8e5b226344ae4
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Mar 4 12:31:23 2013 +0000

    WaE: clarify precedence in WW8SwFlyPara's FlySecur1()

diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 88ed35a..248b02b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1641,8 +1641,8 @@ bool SwWW8ImplReader::SetFlyBordersShadow(SfxItemSet& rFlySet,
 
 static void FlySecur1(short& rSize, const bool bBorder)
 {
-    short nMin = MINFLY +
-        bBorder ? MAX_BORDER_SIZE : MAX_EMPTY_BORDER;
+    const short nMin = MINFLY +
+        (bBorder ? MAX_BORDER_SIZE : MAX_EMPTY_BORDER);
 
     if ( rSize < nMin )
         rSize = nMin;


More information about the Libreoffice-commits mailing list