[Libreoffice-bugs] [Bug 140220] New: Replace SwClient with SvtListener in Writer

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Feb 6 20:44:07 UTC 2021


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

            Bug ID: 140220
           Summary: Replace SwClient with SvtListener in Writer
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: bjoern.michaelsen at libreoffice.org

Description:
SwClient is a very problematic implementation of the observer pattern(*).
However these days all SwModify's are also a sw::BroadcasterMixin. This means
the SwClient can be turned into a SvtListener without much effort to be
notified. This EasyHack is about the following:

1/ find a direct derived class of SwClient (except SwModify/ListenerEntry)
   git grep public.*SwClient
2/ Instead of using SwClients Add/Remove/SWClientNotify/GetRegisteredIn, use
GetNotifier/StartListening/EndListening
   an example of how this might be done can be found on gerrit:
   https://gerrit.libreoffice.org/c/core/+/110495



(*) more details can be found in this talk at LibOCon2018:
https://www.youtube.com/watch?v=j6Znmaroe6M

Steps to Reproduce:
.

Actual Results:
.

Expected Results:
.


Reproducible: Always


User Profile Reset: No



Additional Info:
.

-- 
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/20210206/9356872f/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list