[Libreoffice-commits] core.git: extensions/source

Tor Lillqvist tml at collabora.com
Fri Jun 8 15:56:00 UTC 2018


 extensions/source/ole/unoobjw.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 4328d181b670356c9dbd69f1ec1dedb473b59e8e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Jun 7 15:53:06 2018 +0300

    Fix glitch in SAL_INFO logging
    
    Change-Id: I421d3980c50706f927a0611e48c33a43267dd01b
    Reviewed-on: https://gerrit.libreoffice.org/55477
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 2ec57765b45e..cbe7992852df 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -2105,12 +2105,13 @@ public:
         return S_OK;
     }
 
-    virtual HRESULT STDMETHODCALLTYPE STDMETHODCALLTYPE Skip(ULONG celt) override
+    virtual HRESULT STDMETHODCALLTYPE STDMETHODCALLTYPE Skip(ULONG const celt) override
     {
         comphelper::Automation::AutomationInvokedZone aAutomationActive;
 
+        ULONG nLeft = celt;
         ULONG nSkipped = 0;
-        while (celt > 0)
+        while (nLeft > 0)
         {
             if (mnIndex > mxCollection->getCount())
             {
@@ -2118,7 +2119,7 @@ public:
                 return S_FALSE;
             }
             mnIndex++;
-            celt--;
+            nLeft--;
         }
         SAL_INFO("extensions.olebridge", this << "@CXEnumVariant::Skip(" << celt << "): S_OK");
         return S_OK;


More information about the Libreoffice-commits mailing list