Kaydet (Commit) cc7b8dab authored tarafından Michael Meeks's avatar Michael Meeks

tdf#91633 - dispose chart data-table entries correctly.

Change-Id: Ia26df029888f47a0395ea3c8bd7e0e51a1706c2a
üst f849d964
...@@ -144,6 +144,7 @@ class SeriesHeader ...@@ -144,6 +144,7 @@ class SeriesHeader
{ {
public: public:
explicit SeriesHeader(vcl::Window * pParent, vcl::Window *pColorParent); explicit SeriesHeader(vcl::Window * pParent, vcl::Window *pColorParent);
~SeriesHeader();
void SetColor( const Color & rCol ); void SetColor( const Color & rCol );
void SetPos( const Point & rPos ); void SetPos( const Point & rPos );
...@@ -217,6 +218,13 @@ SeriesHeader::SeriesHeader( vcl::Window * pParent, vcl::Window *pColorParent ) : ...@@ -217,6 +218,13 @@ SeriesHeader::SeriesHeader( vcl::Window * pParent, vcl::Window *pColorParent ) :
Show(); Show();
} }
SeriesHeader::~SeriesHeader()
{
m_spSymbol.disposeAndClear();
m_spSeriesName.disposeAndClear();
m_spColorBar.disposeAndClear();
}
void SeriesHeader::notifyChanges() void SeriesHeader::notifyChanges()
{ {
if( m_aChangeLink.IsSet()) if( m_aChangeLink.IsSet())
...@@ -417,8 +425,7 @@ bool lcl_SeriesHeaderHasFocus( ...@@ -417,8 +425,7 @@ bool lcl_SeriesHeaderHasFocus(
sal_Int32 * pOutIndex = 0 ) sal_Int32 * pOutIndex = 0 )
{ {
sal_Int32 nIndex = 0; sal_Int32 nIndex = 0;
for( ::std::vector< ::boost::shared_ptr< ::chart::impl::SeriesHeader > >::const_iterator aIt( rSeriesHeader.begin()); for( auto aIt = rSeriesHeader.begin(); aIt != rSeriesHeader.end(); ++aIt, ++nIndex )
aIt != rSeriesHeader.end(); ++aIt, ++nIndex )
{ {
if( (*aIt)->HasFocus()) if( (*aIt)->HasFocus())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment