[Libreoffice-commits] .: 2 commits - binfilter/bf_so3

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 14 01:54:25 PDT 2012


 binfilter/bf_so3/source/persist/transprt.cxx |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit c81071c7a0c4b25a64df30e76fedfbe11ec61d04
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Sep 14 01:00:04 2012 -0500

    remove SAL_MIN() macro user

diff --git a/binfilter/bf_so3/source/persist/transprt.cxx b/binfilter/bf_so3/source/persist/transprt.cxx
index e40beb2..2fab1af 100644
--- a/binfilter/bf_so3/source/persist/transprt.cxx
+++ b/binfilter/bf_so3/source/persist/transprt.cxx
@@ -534,7 +534,10 @@ ErrCode UcbTransportLockBytes::ReadAt (
     Sequence<sal_Int8> aData;
     sal_Int32          nSize;
 
-    nCount = SAL_MIN(nCount, 0x7FFFFFFF);
+    if(nCount > 0x7FFFFFFF)
+    {
+        nCount = 0x7FFFFFFF;
+    }
     try
     {
         while (!m_bTerminated)
commit f6606de5181af7f7c034f43c7ca6187c89877fed
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Sep 14 00:59:45 2012 -0500

    remove SAL_MAX() macro user

diff --git a/binfilter/bf_so3/source/persist/transprt.cxx b/binfilter/bf_so3/source/persist/transprt.cxx
index 2151d94..e40beb2 100644
--- a/binfilter/bf_so3/source/persist/transprt.cxx
+++ b/binfilter/bf_so3/source/persist/transprt.cxx
@@ -566,8 +566,14 @@ ErrCode UcbTransportLockBytes::ReadAt (
     if (pRead)
         *pRead = ULONG(nSize);
 
-    sal_uInt32 nRead = SAL_MAX(m_nRead, nPos + nSize);
-    (const_cast< UcbTransportLockBytes* >(this))->m_nRead = nRead;
+    if(m_nRead > nPos + nSize)
+    {
+        (const_cast< UcbTransportLockBytes* >(this))->m_nRead = m_nRead;
+    }
+    else
+    {
+        (const_cast< UcbTransportLockBytes* >(this))->m_nRead = nPos + nSize;
+    }
 
     return ERRCODE_NONE;
 }


More information about the Libreoffice-commits mailing list