summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-27 09:22:13 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-28 09:31:16 +0000
commit43b4903db3e925c652e25c34362490f8adc9c5ec (patch)
treeaf12777b72d42280467e8cc19b914b2c7f4f3816 /chart2
parent7d6308dad9f4a079d57719a6e3a9c4cebb47d051 (diff)
teach stylepolice plugin about ref-counted-pointer naming
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752 Reviewed-on: https://gerrit.libreoffice.org/24459 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/sidebar/ChartAreaPanel.cxx12
-rw-r--r--chart2/source/inc/CloneHelper.hxx12
-rw-r--r--chart2/source/model/main/Axis.cxx4
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx4
-rw-r--r--chart2/source/model/main/ChartModel.cxx10
-rw-r--r--chart2/source/model/main/DataSeries.cxx4
-rw-r--r--chart2/source/model/main/Diagram.cxx8
-rw-r--r--chart2/source/model/main/Title.cxx2
-rw-r--r--chart2/source/model/template/ChartType.cxx2
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx4
-rw-r--r--chart2/source/tools/ErrorBar.cxx2
-rw-r--r--chart2/source/tools/ImplOPropertySet.cxx2
-rw-r--r--chart2/source/tools/RegressionCurveModel.cxx2
13 files changed, 34 insertions, 34 deletions
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 389120bdc70f..85c9ec26f79c 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -413,8 +413,8 @@ void ChartAreaPanel::updateData()
{
OUString aGradientName;
xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
- XGradient xGradient = getXGradientForName(mxModel, aGradientName);
- XFillGradientItem aGradientItem(aGradientName, xGradient);
+ XGradient aGradient = getXGradientForName(mxModel, aGradientName);
+ XFillGradientItem aGradientItem(aGradientName, aGradient);
updateFillGradient(false, true, &aGradientItem);
}
@@ -422,8 +422,8 @@ void ChartAreaPanel::updateData()
{
OUString aHatchName;
xPropSet->getPropertyValue("FillHatchName") >>= aHatchName;
- XHatch xHatch = getXHatchFromName(mxModel, aHatchName);
- XFillHatchItem aHatchItem(aHatchName, xHatch);
+ XHatch aHatch = getXHatchFromName(mxModel, aHatchName);
+ XFillHatchItem aHatchItem(aHatchName, aHatch);
updateFillHatch(false, true, &aHatchItem);
}
@@ -431,8 +431,8 @@ void ChartAreaPanel::updateData()
{
OUString aBitmapName;
xPropSet->getPropertyValue("FillBitmapName") >>= aBitmapName;
- GraphicObject xBitmap = getXBitmapFromName(mxModel, aBitmapName);
- XFillBitmapItem aBitmapItem(aBitmapName, xBitmap);
+ GraphicObject aBitmap = getXBitmapFromName(mxModel, aBitmapName);
+ XFillBitmapItem aBitmapItem(aBitmapName, aBitmap);
XFillBitmapItem* pBitmapItem = nullptr;
DrawModelWrapper* pModelWrapper = nullptr;
try
diff --git a/chart2/source/inc/CloneHelper.hxx b/chart2/source/inc/CloneHelper.hxx
index 7f01b041a467..dfe58235191f 100644
--- a/chart2/source/inc/CloneHelper.hxx
+++ b/chart2/source/inc/CloneHelper.hxx
@@ -35,9 +35,9 @@ namespace CloneHelper
template< class Interface >
struct CreateRefClone : public ::std::unary_function< Interface, Interface >
{
- Interface operator() ( const Interface & xOther )
+ css::uno::Reference<Interface> operator() ( const css::uno::Reference<Interface> & xOther )
{
- Interface xResult;
+ css::uno::Reference<Interface> xResult;
css::uno::Reference< css::util::XCloneable >
xCloneable( xOther, css::uno::UNO_QUERY );
if( xCloneable.is())
@@ -50,8 +50,8 @@ template< class Interface >
/// clones a vector of UNO-References
template< class Interface >
void CloneRefVector(
- const ::std::vector< Interface > & rSource,
- ::std::vector< Interface > & rDestination )
+ const ::std::vector< css::uno::Reference< Interface > > & rSource,
+ ::std::vector< css::uno::Reference< Interface > > & rDestination )
{
::std::transform( rSource.begin(), rSource.end(),
::std::back_inserter( rDestination ),
@@ -61,8 +61,8 @@ template< class Interface >
/// clones a UNO-sequence of UNO-References
template< class Interface >
void CloneRefSequence(
- const css::uno::Sequence< Interface > & rSource,
- css::uno::Sequence< Interface > & rDestination )
+ const css::uno::Sequence< css::uno::Reference<Interface> > & rSource,
+ css::uno::Sequence< css::uno::Reference<Interface> > & rDestination )
{
rDestination.realloc( rSource.getLength());
::std::transform( rSource.getConstArray(), rSource.getConstArray() + rSource.getLength(),
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index df943dc4a18d..5f97ee41b46d 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -371,7 +371,7 @@ Axis::Axis( const Axis & rOther ) :
m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()),
m_aScaleData( rOther.m_aScaleData )
{
- m_xGrid.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xGrid ));
+ m_xGrid.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xGrid ));
if( m_xGrid.is())
ModifyListenerHelper::addListener( m_xGrid, m_xModifyEventForwarder );
@@ -382,7 +382,7 @@ Axis::Axis( const Axis & rOther ) :
lcl_CloneSubGrids( rOther.m_aSubGridProperties, m_aSubGridProperties );
ModifyListenerHelper::addListenerToAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
- m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
+ m_xTitle.set( CloneHelper::CreateRefClone< chart2::XTitle >()( rOther.m_xTitle ));
if( m_xTitle.is())
ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
}
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 755cadfa3af7..d3eeedfade34 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -172,8 +172,8 @@ BaseCoordinateSystem::BaseCoordinateSystem(
m_aAllAxis.resize(rSource.m_aAllAxis.size());
tAxisVecVecType::size_type nN=0;
for( nN=0; nN<m_aAllAxis.size(); nN++ )
- CloneHelper::CloneRefVector< Reference< chart2::XAxis > >( rSource.m_aAllAxis[nN], m_aAllAxis[nN] );
- CloneHelper::CloneRefVector< Reference< chart2::XChartType > >( rSource.m_aChartTypes, m_aChartTypes );
+ CloneHelper::CloneRefVector<chart2::XAxis>( rSource.m_aAllAxis[nN], m_aAllAxis[nN] );
+ CloneHelper::CloneRefVector<chart2::XChartType>( rSource.m_aChartTypes, m_aChartTypes );
for( nN=0; nN<m_aAllAxis.size(); nN++ )
ModifyListenerHelper::addListenerToAllElements( m_aAllAxis[nN], m_xModifyEventForwarder );
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 2228337aec51..48ec54304805 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -168,11 +168,11 @@ ChartModel::ChartModel( const ChartModel & rOther )
m_xOldModelAgg->setDelegator( *this );
Reference< util::XModifyListener > xListener;
- Reference< chart2::XTitle > xNewTitle = CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle );
- Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< Reference< chart2::XDiagram > >()( rOther.m_xDiagram );
- Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground );
- Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager );
- Reference< container::XNameAccess > xXMLNamespaceMap = CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap );
+ Reference< chart2::XTitle > xNewTitle = CreateRefClone< chart2::XTitle >()( rOther.m_xTitle );
+ Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< chart2::XDiagram >()( rOther.m_xDiagram );
+ Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< beans::XPropertySet >()( rOther.m_xPageBackground );
+ Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< chart2::XChartTypeManager >()( rOther.m_xChartTypeManager );
+ Reference< container::XNameAccess > xXMLNamespaceMap = CreateRefClone< container::XNameAccess >()( rOther.m_xXMLNamespaceMap );
{
MutexGuard aGuard( m_aModelMutex );
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index cf9cae2c43f6..d016f2160476 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -139,12 +139,12 @@ DataSeries::DataSeries( const DataSeries & rOther ) :
{
if( ! rOther.m_aDataSequences.empty())
{
- CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
+ CloneHelper::CloneRefVector<css::chart2::data::XLabeledDataSequence>(
rOther.m_aDataSequences, m_aDataSequences );
ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
}
- CloneHelper::CloneRefVector< Reference< chart2::XRegressionCurve > >( rOther.m_aRegressionCurves, m_aRegressionCurves );
+ CloneHelper::CloneRefVector< chart2::XRegressionCurve >( rOther.m_aRegressionCurves, m_aRegressionCurves );
ModifyListenerHelper::addListenerToAllElements( m_aRegressionCurves, m_xModifyEventForwarder );
// add as listener to XPropertySet properties
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 8a2b352dc39a..f1ef40f30223 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -333,10 +333,10 @@ Diagram::Diagram( const Diagram & rOther ) :
lcl_CloneCoordinateSystems( rOther.m_aCoordSystems, m_aCoordSystems );
ModifyListenerHelper::addListenerToAllElements( m_aCoordSystems, m_xModifyEventForwarder );
- m_xWall.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xWall ));
- m_xFloor.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xFloor ));
- m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
- m_xLegend.set( CloneHelper::CreateRefClone< Reference< chart2::XLegend > >()( rOther.m_xLegend ));
+ m_xWall.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xWall ));
+ m_xFloor.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xFloor ));
+ m_xTitle.set( CloneHelper::CreateRefClone< chart2::XTitle >()( rOther.m_xTitle ));
+ m_xLegend.set( CloneHelper::CreateRefClone< chart2::XLegend >()( rOther.m_xLegend ));
ModifyListenerHelper::addListener( m_xWall, m_xModifyEventForwarder );
ModifyListenerHelper::addListener( m_xFloor, m_xModifyEventForwarder );
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index a0b7bdfa7f07..9b620c0aee51 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -243,7 +243,7 @@ Title::Title( const Title & rOther ) :
::property::OPropertySet( rOther, m_aMutex ),
m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
- CloneHelper::CloneRefSequence< uno::Reference< chart2::XFormattedString > >(
+ CloneHelper::CloneRefSequence<chart2::XFormattedString>(
rOther.m_aStrings, m_aStrings );
ModifyListenerHelper::addListenerToAllElements(
ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder );
diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx
index 7b020dc6c133..7bbe32b4e3d1 100644
--- a/chart2/source/model/template/ChartType.cxx
+++ b/chart2/source/model/template/ChartType.cxx
@@ -57,7 +57,7 @@ ChartType::ChartType( const ChartType & rOther ) :
{
{
SolarMutexGuard g; // access to rOther.m_aDataSeries
- CloneHelper::CloneRefVector<Reference<chart2::XDataSeries> >(
+ CloneHelper::CloneRefVector<css::chart2::XDataSeries>(
rOther.m_aDataSeries, m_aDataSeries);
}
ModifyListenerHelper::addListenerToAllElements( m_aDataSeries, m_xModifyEventForwarder );
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 6528d78e382c..11a6c762336f 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -239,9 +239,9 @@ uno::Reference< chart2::data::XDataSource > DataSourceHelper::pressUsedDataIntoR
if( xCategories.is() )
aResultVector.push_back( xCategories );
- ::std::vector< Reference< chart2::XDataSeries > > xSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
+ ::std::vector< Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) );
uno::Reference< chart2::data::XDataSource > xSeriesSource(
- DataSeriesHelper::getDataSource( comphelper::containerToSequence(xSeriesVector) ) );
+ DataSeriesHelper::getDataSource( comphelper::containerToSequence(aSeriesVector) ) );
Sequence< Reference< chart2::data::XLabeledDataSequence > > aDataSeqences( xSeriesSource->getDataSequences() );
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index d35c6fa53bce..8833074513bd 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -116,7 +116,7 @@ ErrorBar::ErrorBar( const ErrorBar & rOther ) :
if( ! rOther.m_aDataSequences.empty())
{
if( lcl_isInternalData( rOther.m_aDataSequences.front()))
- CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
+ CloneHelper::CloneRefVector< css::chart2::data::XLabeledDataSequence >(
rOther.m_aDataSequences, m_aDataSequences );
else
m_aDataSequences = rOther.m_aDataSequences;
diff --git a/chart2/source/tools/ImplOPropertySet.cxx b/chart2/source/tools/ImplOPropertySet.cxx
index 3fe1e9413c9b..f86fe8007f8b 100644
--- a/chart2/source/tools/ImplOPropertySet.cxx
+++ b/chart2/source/tools/ImplOPropertySet.cxx
@@ -100,7 +100,7 @@ ImplOPropertySet::ImplOPropertySet( const ImplOPropertySet & rOther )
::std::copy( rOther.m_aProperties.begin(), rOther.m_aProperties.end(),
::std::inserter( m_aProperties, m_aProperties.begin() ));
cloneInterfaceProperties();
- m_xStyle.set( ::chart::CloneHelper::CreateRefClone< Reference< style::XStyle > >()( rOther.m_xStyle ));
+ m_xStyle.set( ::chart::CloneHelper::CreateRefClone< style::XStyle >()( rOther.m_xStyle ));
}
beans::PropertyState ImplOPropertySet::GetPropertyStateByHandle( sal_Int32 nHandle ) const
diff --git a/chart2/source/tools/RegressionCurveModel.cxx b/chart2/source/tools/RegressionCurveModel.cxx
index 185354cf613c..0133ff032268 100644
--- a/chart2/source/tools/RegressionCurveModel.cxx
+++ b/chart2/source/tools/RegressionCurveModel.cxx
@@ -206,7 +206,7 @@ RegressionCurveModel::RegressionCurveModel( const RegressionCurveModel & rOther
m_eRegressionCurveType( rOther.m_eRegressionCurveType ),
m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
{
- m_xEquationProperties.set( CloneHelper::CreateRefClone< uno::Reference< beans::XPropertySet > >()( rOther.m_xEquationProperties ));
+ m_xEquationProperties.set( CloneHelper::CreateRefClone< beans::XPropertySet >()( rOther.m_xEquationProperties ));
ModifyListenerHelper::addListener( m_xEquationProperties, m_xModifyEventForwarder );
}