<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Writer hangs on inserting ToC if "Enable cursor" is unchecked"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=135384#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Writer hangs on inserting ToC if "Enable cursor" is unchecked"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=135384">bug 135384</a>
              from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
        <pre>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;
?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>