Issue 86850 - replace the mix of XMultiServiceFactory/XComponentContext in OGenericUnoDialog, introduced with CWS rptchart01
Summary: replace the mix of XMultiServiceFactory/XComponentContext in OGenericUnoDialo...
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.0
Assignee: Frank Schönheit
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-09 21:51 UTC by Frank Schönheit
Modified: 2009-07-20 15:56 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2008-03-09 21:51:13 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?
Comment 1 Frank Schönheit 2008-03-09 21:51:48 UTC
should be fixed ASAP, IMO.
Comment 2 ocke.janssen 2008-04-18 09:59:08 UTC
Fixed in cws rptchart02
Comment 3 ocke.janssen 2008-05-02 11:36:51 UTC
Please verify. Thanks.
Comment 4 Frank Schönheit 2008-05-05 07:08:04 UTC
thanks for fixing this!
Comment 5 thorsten.ziehm 2009-07-20 15:56:44 UTC
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