Issue 107771

Summary: [sw] remove the UnoCallBack
Product: Writer Reporter: mst.ooo
Component: programmingAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues, os_ooo
Version: OOo 1.0.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description mst.ooo 2009-12-18 15:39:04 UTC
During investigation of issue 105557 it turned out that creating uno References
from SwModify listeners is inherently not thread-safe.

With the unocore locking refactoring work in CWS swunolocking1, the class
SwUnoCallBack was removed, because all it did was allow for this unsafe use of
its registered listeners; SwDoc::pUnoCallBack is now simply a SwModify.

As a consequence, every time a uno object for a ReferenceMark,
DocumentIndexMark, or Footnote is required, a new one will be created.
This is suboptimal: the uno objects for these should register directly at the
corresponding core objects, which should have a weak reference to the uno
object, thus allowing for re-use of existing uno objects in a thread-safe way.

When this is done, SwDoc::pUnoCallBack can be removed completely.
Comment 1 mst.ooo 2010-01-11 13:48:23 UTC
because xmloff depends on this, i've fixed it for SwXDocumentIndexMark already
in CWS swunolocking1.

http://hg.services.openoffice.org/hg/cws/swunolocking1/rev/92a84f268046

furthermore i've noticed that text fields also register at the UnoCallback, but
for these there seemed to be no instance caching.
Comment 2 Marcus 2017-05-20 11:15:40 UTC
Reset assigne to the default "issues@openoffice.apache.org".