[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - dtrans/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 4 07:01:57 UTC 2019


 dtrans/source/win32/dtobj/DOTransferable.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5deaeab8705e43189d3541b55a41fe853e230c2e
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Oct 10 16:37:15 2018 +0200
Commit:     Juergen Funk (CIB) <juergen.funk_ml at cib.de>
CommitDate: Tue Jun 4 09:01:20 2019 +0200

    Properly check HRESULT
    
    Although the IEnumFORMATETC::Next documentation only mentions S_OK and
    S_FALSE, there are error codes that also may be returned: e.g.,
    0x800706BA RPC server unavailable (encountered locally in a unit test).
    In that case, this used to loop infinitely.
    
    We are only interested in S_OK result, so check for it.
    
    Change-Id: I062e409e84efb68353321f7c48d922ec83191f73
    Reviewed-on: https://gerrit.libreoffice.org/61621
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 9eb489da4682a89ab96b0d6a8ba13418aac4ca9d)
    Reviewed-on: https://gerrit.libreoffice.org/73427
    Reviewed-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>
    Tested-by: Juergen Funk (CIB) <juergen.funk_ml at cib.de>

diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx
index 2b3f5ff2e890..db70196e18a3 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/dtrans/source/win32/dtobj/DOTransferable.cxx
@@ -281,7 +281,7 @@ void CDOTransferable::initFlavorList( )
         pEnumFormatEtc->Reset( );
 
         FORMATETC fetc;
-        while ( S_FALSE != pEnumFormatEtc->Next( 1, &fetc, nullptr ) )
+        while ( S_OK == pEnumFormatEtc->Next( 1, &fetc, nullptr ) )
         {
             // we use locales only to determine the
             // charset if there is text on the cliboard


More information about the Libreoffice-commits mailing list