<div dir="ltr">Hi, <div>I'm trying to fix <a href="https://bugs.documentfoundation.org/show_bug.cgi?id=47065" target="_blank">tdf#47065</a> as it's a challenging <i>easyHack</i>. I have decided to move one step at a time in order to resolve it at a slow and steady pace.</div><div>My first step is to find out a way to check if the lock from the previously opened file is released and the file is now ready to use. In the change <a href="https://gerrit.libreoffice.org/#/c/84919/4/sfx2/source/doc/docfile.cxx" target="_blank">[1]</a> , I have tried to check if the file lock has been disappeared, please let me know if it is the right way to do it. 

I also tested the change on my local machine to see if it works.

</div><div><br></div><div>I've made use of this expression:</div><div><pre style="border:0px;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span id="m_-8279481888772647242gmail-scope_id_d5193f0b_fold" style="display:inline"><b>bool</b> <a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx?r=cc4dbe47#bHandleSysLocked" style="text-decoration-line:none;color:rgb(153,0,153);font-weight:bold" target="_blank">bHandleSysLocked</a> = ( <a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx?r=cc4dbe47#bLoading" style="text-decoration-line:none;color:rgb(153,0,153);font-weight:bold" target="_blank">bLoading</a> && <a href="https://opengrok.libreoffice.org/s?defs=bUseSystemLock&project=core" style="text-decoration-line:none;color:rgb(32,48,162)" target="_blank">bUseSystemLock</a> && !<a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx?r=cc4dbe47#pImpl" style="text-decoration-line:none;color:rgb(153,0,153);font-weight:bold" target="_blank">pImpl</a>-><a href="https://opengrok.libreoffice.org/s?defs=xStream&project=core" style="text-decoration-line:none;color:rgb(32,48,162)" target="_blank">xStream</a>.<a href="https://opengrok.libreoffice.org/s?defs=is&project=core" style="text-decoration-line:none;color:rgb(32,48,162)" target="_blank">is</a>() && !<a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx?r=cc4dbe47#pImpl" style="text-decoration-line:none;color:rgb(153,0,153);font-weight:bold" target="_blank">pImpl</a>-><a href="https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx?r=cc4dbe47#m_pOutStream" style="text-decoration-line:none;color:rgb(153,0,153);font-weight:bold" target="_blank">m_pOutStream</a> );</span></pre></div><div></div><div><br></div><div>Also, when reviewing the change, please try to ignore the  function and variable names which were chosen arbitrarily.. </div><div>Any given help is appreciated. Thanks!</div><div><br></div><div>--</div><div>Regards,</div><div>Aditya</div><div><br></div><div>[1] <a href="https://gerrit.libreoffice.org/#/c/84919/4/sfx2/source/doc/docfile.cxx">https://gerrit.libreoffice.org/#/c/84919/4/sfx2/source/doc/docfile.cxx</a></div></div>