Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


fdo#51243 caused by error in fix to fdo#48932, which introduced
infinite loop, and thus from the user's POV a freeze of the whole LibO
process.

Not visible in the patch, here's the code affected:

void SwFrameControlsManager::SetReadonlyControls( bool bReadonly )
{
    map< FrameControlType, SwFrameControlPtrMap >::iterator pIt =
    m_aControls.begin();

    while ( pIt != m_aControls.end() )
    {
        SwFrameControlPtrMap::iterator aCtrlIt = pIt->second.begin();
        while ( aCtrlIt != pIt->second.end() )
        {
            aCtrlIt->second->SetReadonly( bReadonly );
            ++aCtrlIt;
        }
    }
}

There's "obviously" a "++pIt;" missing there!

Attached patch fixes that. Please apply to libreoffice-3-5 and
libreoffice-3-5-5.


Thanks.

-- 
Lionel
From a2c9059f4137b208842786d37903722c60df202e Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Wed, 20 Jun 2012 10:49:14 +0200
Subject: [PATCH] fdo#51243 infinite loop in
 SwFrameControlsManager::SetReadonlyControls

Change-Id: Id2c6fa349203b62869b75b9b8560c9ce7e365897
---
 sw/source/ui/docvw/FrameControlsManager.cxx |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx 
b/sw/source/ui/docvw/FrameControlsManager.cxx
index 1413942..bcc489f 100644
--- a/sw/source/ui/docvw/FrameControlsManager.cxx
+++ b/sw/source/ui/docvw/FrameControlsManager.cxx
@@ -122,6 +122,7 @@ void SwFrameControlsManager::SetReadonlyControls( bool bReadonly )
             aCtrlIt->second->SetReadonly( bReadonly );
             ++aCtrlIt;
         }
+        ++pIt;
     }
 }
 
-- 
1.7.10


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.