Issue 109881 - chart2: ChartTypeTemplateProvider has no virtual dtor, but delete is called on ChartTypeTemplateProvider* on inherited objects
Summary: chart2: ChartTypeTemplateProvider has no virtual dtor, but delete is called o...
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Linux, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: caolanm
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks: 106602
  Show dependency tree
 
Reported: 2010-03-06 16:51 UTC by caolanm
Modified: 2013-02-24 21:22 UTC (History)
2 users (show)

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


Attachments
easiest fix (1011 bytes, patch)
2010-03-06 16:51 UTC, caolanm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description caolanm 2010-03-06 16:51:00 UTC
i.e.
source/controller/dialogs/ChartTypeTemplateProvider.hxx

class ChartTypeTemplateProvider
{
public:
    virtual ::com::sun::star::uno::Reference<
                ::com::sun::star::chart2::XChartTypeTemplate >
getCurrentTemplate() const =0;
};

and in source/controller/inc/dlg_DataSource.hxx

class DataSourceDialog :
...
    ::std::auto_ptr< ChartTypeTemplateProvider >  m_apDocTemplateProvider;


source/controller/dialogs/dlg_DataSource.cxx

        m_apDocTemplateProvider( new DocumentChartTypeTemplateProvider(
xChartDocument )),

so, when m_apDocTemplateProvider goes out of scope, it does *not* call
DocumentChartTypeTemplateProvider::~DocumentChartTypeTemplateProvider

ResourceChangeListener is similar, but as it happens no direct delete on that
base occurs, but safest to add a virtual dtor to it as well, patch attached to
add virtual dtors to both.
Comment 1 caolanm 2010-03-06 16:51:34 UTC
Created attachment 68190 [details]
easiest fix
Comment 2 IngridvdM 2010-03-09 16:09:39 UTC
Fixed in CWS chart43.
Comment 3 IngridvdM 2010-03-09 16:16:56 UTC
@CMC, please verify the fix in CWS chart43. Thanks!
Comment 4 caolanm 2010-03-09 16:20:18 UTC
verified
Comment 5 caolanm 2010-04-22 10:25:40 UTC
integrated DEV300_m76