To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=62519





------- Additional comments from [EMAIL PROTECTED] Thu Mar 23 02:20:38 -0800 
2006 -------
At the time the notifications are about to be sent, the old and new value (on
which the decision whether to sent notifications would be based) are not known
(the values need not be provided in a call to prepareSet, might be obsolete by
the time the notifications are about to be sent, and the code that decides
whether to send notifications cannot easily read the old value safely in a
multithreaded scenario).  A possible solution would be to change prepareSet to
do nothing if oldValue equals newValue (and leave the bound listeners empty). 
However:
1  This would require every caller of prepareSet to supply oldValue and
newValue, which is highly undesirable.
2  This can easily be done by client code (that is willing to make available
oldValue prior to setting newValue): if oldValue equals newValue, do not perform
the sequence of calling prepareSet, setting the new value, and calling
BoundListeners.notify.  (Watch out that at least C++
com::sun::star::uno::Any::operator== and Java com.sun.star.uno.Any.equals have
slightly different semantics, when doing the check for equality of oldValue and
newValue).
3  This could of course also be offered as an additional helper function at
ProperytSetMixin:
  bool prepareSetIfDifferent(propertyName, oldValue, newValue, boundListeners)
which would require oldValue and newValue to be set.

Ocke, in light of the above, would you agree that this issue should be solved in
the client code, or would you prefer a corresponding helper function bool
prepareSetIfDifferent(...) at PropertySetMixin?

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to