<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:jeanmarczambon@gmail.com" title="jeanmarczambon@gmail.com">jeanmarczambon@gmail.com</a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Python script provider does not reload modified embedded scripts"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=105609">bug 105609</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Assignee</td>
           <td>libreoffice-bugs@lists.freedesktop.org
           </td>
           <td>jeanmarczambon@gmail.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Python script provider does not reload modified embedded scripts"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=105609#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Python script provider does not reload modified embedded scripts"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=105609">bug 105609</a>
              from <span class="vcard"><a class="email" href="mailto:jeanmarczambon@gmail.com" title="jeanmarczambon@gmail.com">jeanmarczambon@gmail.com</a>
</span></b>
        <pre>It's seems definitly not possible to use a change flag for identifying any
modification in an embedded script.

So I proposed another (easy) way to workaround this: making use of a global
variable in the pythonscript.py code, accessible from the client which is
modifying the script and allowing it to force the reload.
That client could use it this way:

    def update_embedded_script(sfa, sourceurl, scripturi):
        '''embed script in document and inform 
        pythonscript.py about the changes'''
        # sfa is an instance of css.ucb.SimpleFileAccess
        sfa.copy(sourceurl, scripturi)
        import pythonscript
        pythonscript.g_forcedReloadUrls.add(scripturi)

See details here: <a href="https://gerrit.libreoffice.org/33981">https://gerrit.libreoffice.org/33981</a>.</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>