[Libreoffice-bugs] [Bug 105609] Python script provider does not reload modified embedded scripts

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jan 31 08:00:27 UTC 2019


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

jeanmarczambon at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|libreoffice-bugs at lists.free |jeanmarczambon at gmail.com
                   |desktop.org                 |

--- Comment #21 from jeanmarczambon at gmail.com ---
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: https://gerrit.libreoffice.org/33981.

-- 
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/20190131/a7d10caf/attachment.html>


More information about the Libreoffice-bugs mailing list