diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 08:20:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 08:38:02 +0200 |
commit | 87c06415cebd707ae359cb2f1b06d468cb6afb08 (patch) | |
tree | 2732c68fcc98c03f6fecddc59000e9e25b067c2d /sc/source/ui/unoobj/dapiuno.cxx | |
parent | f31c9f16fefd16ea434cdd68721d45bced9b78e1 (diff) |
clang-tidy performance-unnecessary-copy-init in sc
Change-Id: I93ded61c22bd533a6ffaddd20d6e527f176e7651
Reviewed-on: https://gerrit.libreoffice.org/62218
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/unoobj/dapiuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/dapiuno.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index f7bf1d0cbcf3..3a56fb138e25 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -344,8 +344,7 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd { if ( nFound == nIndex ) { - OUString aName = rDPObj.GetName(); - return new ScDataPilotTableObj( pDocShell, nTab, aName ); + return new ScDataPilotTableObj( pDocShell, nTab, rDPObj.GetName() ); } ++nFound; } @@ -2538,7 +2537,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons ScDPObject* pDPObj = nullptr; if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) ) { - OUString aDimName = pDim->GetName(); + const OUString& aDimName = pDim->GetName(); ScDPSaveData aSaveData = *pDPObj->GetSaveData(); ScDPDimensionSaveData* pDimData = aSaveData.GetDimensionData(); // created if not there |