Apache OpenOffice (AOO) Bugzilla – Issue 86850
replace the mix of XMultiServiceFactory/XComponentContext in OGenericUnoDialog, introduced with CWS rptchart01
Last modified: 2009-07-20 15:56:44 UTC
CWS rptchart01 introduced a member "m_xContext" of type XComponentContext, which is filled if and only if the class-ctor taking an XComponentContext is used. If the other ctor (taking an XMultiServiceFactory, which is kind of a legacy version of the XComponentContext) is used, this member is not set. This behaviour is prone to breakage: clients which use the Service-Factory-ctor will be, sooner or later, tempted to use m_xContext. Also, the member is, speaking strictly, superfluous, since it could be obtained from the m_xORB member. For those reasons, the change introduced in CWS rptchart01 should be corrected, in either of two ways: 1. Also initialize m_xContext in the first ctor 2. don't maintain two different members, but only one, and adjust the clients/derivees where necessary. This could be done by either removing one of m_xORB or m_xContext, or by replacing /both/ of them with an instance of ::comphelper::ComponentContext, which provides convenient access to the combined functionality, plus more convenience methods. Do I need to mention I'd prefer the second way?
should be fixed ASAP, IMO.
Fixed in cws rptchart02
Please verify. Thanks.
thanks for fixing this!
This issue is closed automatically and wasn't rechecked in a current version of OOo. The fixed issue should be integrated in OOo since more than half a year. If you think this issue isn't fixed in a current version (OOo 3.1), please reopen it and change the field 'Target Milestone' accordingly. If you want to download a current version of OOo => http://download.openoffice.org/index.html If you want to know more about the handling of fixed/verified issues => http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues