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





------- Additional comments from [EMAIL PROTECTED] Thu Feb  1 02:03:09 -0800 
2007 -------
fs->ab:
The assertion is because DialogWindow::StoreData tries to write its dialog,
which is vetoed because the library is read-only. However, normally, StoreData
should not attempt to write the dialog at all - it is not modified.
But it *assumes* it is modified because previously, it was declared to be
modified through calls of |SetDialogModelChanged(TRUE)|, with the following 
stack:
DlgEdObj::_propertyChange
DlgEdPropListenerImpl::propertyChange
cppu::OPropertySetHelper::fire
comphelper::OPropertySetAggregationHelper::propertiesChange
cppu::OPropertySetHelper::firePropertiesChangeEvent
UnoDialogControl::ImplUpdateResourceResolver
UnoDialogControl::ImplStartListingForResourceEvents
UnoDialogControl::setModel
sdr::contact::ViewObjectContactOfUnoControl_Impl::createControlForDevice
sdr::contact::ViewObjectContactOfUnoControl::getTemporaryControlForWindow
sdr::contact::ViewContactOfUnoControl::getTemporaryControlForWindow
SdrUnoObj::GetTemporaryControlForWindow
DlgEdObj::getFormDeviceInfo

So what happens here is:
The Basic/Dialog library is opened, during this, somebody requests the
FormDeviceInfo for a control. This needs to create a temporary control for the
dialog. This new (temporary) control, in its ImplUpdateResourceResolver, decides
to fire artificial property changes of all language dependent properties. On of
the listeners, the DlgEdObj, marks the dialog as modified because of this
(assumed) property change.

I think there are several problems here:
First, firing artificial property changes is a Bad Thing in general, at least
for my taste. It might trigger a lot (potentially) unwanted code. I'm not
completely sure about the reason for this firing, but isn't there a better way?

Second, the code for firing the artificial events looks like this:
  Reference< XMultiPropertySet >        xMultiPropSet( xPropertySet, ... );
  Reference< XPropertiesChangeListener > xListener( xPropertySet, ... );
  xMultiPropSet->firePropertiesChangeEvent( ..., xListener )
where xPropertySet is the dialog's model.
What you do here is using an implementation detail of the DialogControlModel: it
is derived from ::comphelper::OPropertySetAggregationHelper, which, by accident,
implements the XPropertiesChangeListener interface. One day, this base class
could be refactored so it doesn't support this interface anymore - in this case
your code would immediately crash.

I don't know which instance should be notified here, but it's certainly not the
model (xPropertySet) itself. The code only works because the dialog model (the
aggregation helper, respectively) in turn forwards the element to its own 
listeners.

---------------------------------------------------------------------
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