summaryrefslogtreecommitdiff
path: root/chart2/source/controller/main/ObjectHierarchy.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-21 18:07:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-22 11:22:05 +0100
commit1a6e00363fcc2439f4fa43e165009c9a40f1ae84 (patch)
tree1bb2a2c732f3ab00a42a087c3315228d6d0d20d4 /chart2/source/controller/main/ObjectHierarchy.cxx
parentcf0e691d42661d14dc8c653e48d3f9662861786d (diff)
simplify function object
Change-Id: Iadba25f2c7ceae1dfc24de421b88ba9e8afb9155 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128738 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/main/ObjectHierarchy.cxx')
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx22
1 files changed, 4 insertions, 18 deletions
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 326d43461d9f..1fb449026f3a 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -61,21 +61,6 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-struct lcl_ObjectToOID
-{
- explicit lcl_ObjectToOID( const rtl::Reference<::chart::ChartModel> & xChartDoc ) :
- m_xModel( xChartDoc )
- {}
-
- ::chart::ObjectIdentifier operator() ( const Reference< uno::XInterface > & xObj )
- {
- return ::chart::ObjectIdentifier( ::chart::ObjectIdentifier::createClassifiedIdentifierForObject( xObj, m_xModel ) );
- }
-
-private:
- rtl::Reference<::chart::ChartModel> m_xModel;
-};
-
void lcl_getChildOIDs(
::chart::ObjectHierarchy::tChildContainer& rOutChildren,
const Reference< container::XIndexAccess >& xShapes )
@@ -238,9 +223,10 @@ void ObjectHierarchy::createAxesTree(
Sequence< Reference< XAxis > > aAxes( AxisHelper::getAllAxesOfDiagram( xDiagram, /* bOnlyVisible = */ true ) );
if( !m_bOrderingForElementSelector )
- std::transform( std::cbegin(aAxes), std::cend(aAxes),
- std::back_inserter( rContainer ),
- lcl_ObjectToOID( xChartDoc ));
+ {
+ for (const auto & rAxis : std::as_const(aAxes))
+ rContainer.push_back( ObjectIdentifier::createClassifiedIdentifierForObject( rAxis, xChartDoc ) );
+ }
// get all axes, also invisible ones
aAxes = AxisHelper::getAllAxesOfDiagram( xDiagram );