summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/ChartModel.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-18 21:13:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-19 07:06:52 +0100
commit25298b632f31b02b664c72fac91ae77d1531a9db (patch)
tree3491af5080494447288d35502940f40b265960e7 /chart2/source/model/main/ChartModel.cxx
parent65c4b292afda53c1fffd9be3b88d4a5c535149ca (diff)
use more concrete types in chart2, PageBackground
Change-Id: I432b77bab48c8574373daa00916ef6ceea4ebc93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/main/ChartModel.cxx')
-rw-r--r--chart2/source/model/main/ChartModel.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 33501965bc48..00aee342a50d 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -109,7 +109,7 @@ ChartModel::ChartModel(uno::Reference<uno::XComponentContext > const & xContext)
}
{
- ModifyListenerHelper::addListener( m_xPageBackground, this );
+ m_xPageBackground->addModifyListener( this );
m_xChartTypeManager = new ::chart::ChartTypeManager( m_xContext );
}
osl_atomic_decrement(&m_refCount);
@@ -150,7 +150,7 @@ ChartModel::ChartModel( const ChartModel & rOther )
Reference< util::XModifyListener > xListener;
Reference< chart2::XTitle > xNewTitle = CreateRefClone< chart2::XTitle >()( rOther.m_xTitle );
rtl::Reference< ::chart::Diagram > xNewDiagram = new ::chart::Diagram( *rOther.m_xDiagram );
- Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< beans::XPropertySet >()( rOther.m_xPageBackground );
+ rtl::Reference< ::chart::PageBackground > xNewPageBackground = new PageBackground( *rOther.m_xPageBackground );
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager; // does not implement XCloneable
rtl::Reference< ::chart::NameContainer > xXMLNamespaceMap = new NameContainer( *rOther.m_xXMLNamespaceMap );
@@ -167,7 +167,8 @@ ChartModel::ChartModel( const ChartModel & rOther )
ModifyListenerHelper::addListener( xNewTitle, xListener );
if( xNewDiagram && xListener)
xNewDiagram->addModifyListener( xListener );
- ModifyListenerHelper::addListener( xNewPageBackground, xListener );
+ if( xNewPageBackground && xListener)
+ xNewPageBackground->addModifyListener( xListener );
xListener.clear();
}
osl_atomic_decrement(&m_refCount);
@@ -542,7 +543,7 @@ void SAL_CALL ChartModel::dispose()
m_xChartTypeManager.clear();
m_xDiagram.clear();
DisposeHelper::DisposeAndClear( m_xTitle );
- DisposeHelper::DisposeAndClear( m_xPageBackground );
+ m_xPageBackground.clear();
m_xXMLNamespaceMap.clear();
m_xStorage.clear();