[Libreoffice-bugs] [Bug 135384] Writer hangs on inserting ToC if "Enable cursor" is unchecked

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Aug 3 11:43:03 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=135384

--- Comment #3 from Julien Nabet <serval2412 at yahoo.fr> ---
I noticed 2 fishy parts:
1)
   1799             bool bWasAllProtect = m_bAllProtect;
   1800             m_bAllProtect = false;
   1801             if( bWasAllProtect && GetDoc()->GetDocShell() &&
   1802                 GetDoc()->GetDocShell()->IsReadOnlyUI() )
   1803             {
   1804                 GetDoc()->GetDocShell()->SetReadOnlyUI( false );
   1805                 CallChgLnk();       // notify UI!
   1806             }
   1807         }
Shouldn't we add "m_bAllProtect = bWasAllProtect;" before line 1807 ?

2)
   1899                     bool bWasAllProtect = m_bAllProtect;
   1900                     m_bAllProtect = false;
   1901                     if( bWasAllProtect && GetDoc()->GetDocShell() &&
   1902                         GetDoc()->GetDocShell()->IsReadOnlyUI() )
   1903                     {
   1904                         GetDoc()->GetDocShell()->SetReadOnlyUI( false
);
   1905                         CallChgLnk();       // notify UI!
   1906                     }
   1907                     m_bAllProtect = false;
shouldn't it be m_bAllProtect = bWasAllProtect;
?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200803/58f83a22/attachment.htm>


More information about the Libreoffice-bugs mailing list