summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh5.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-22 13:17:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-26 11:51:44 +0200
commit364af18d7394c113dc8624c0c84de28c2747a927 (patch)
tree7cc0f17e173906dbe602a3abef7208c6ad3a5900 /sc/source/ui/docshell/docsh5.cxx
parent2dac65c50481684863433d67999c0ecf81c67e6b (diff)
loplugin:useuniqueptr in ScConsolidateParam
Change-Id: I451315b844e759db3084220a1c889f47775189e3 Reviewed-on: https://gerrit.libreoffice.org/56331 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell/docsh5.cxx')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 2b43c4de1dfe..feb168a74a07 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -511,13 +511,13 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
bool bErr = false;
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
- ScArea* pArea = rParam.ppDataAreas[nPos];
- nColSize = std::max( nColSize, SCCOL( pArea->nColEnd - pArea->nColStart + 1 ) );
- nRowSize = std::max( nRowSize, SCROW( pArea->nRowEnd - pArea->nRowStart + 1 ) );
+ ScArea const & rArea = rParam.pDataAreas[nPos];
+ nColSize = std::max( nColSize, SCCOL( rArea.nColEnd - rArea.nColStart + 1 ) );
+ nRowSize = std::max( nRowSize, SCROW( rArea.nRowEnd - rArea.nRowStart + 1 ) );
// test if source data were moved
if (rParam.bReferenceData)
- if (pArea->nTab == rParam.nTab && pArea->nRowEnd >= rParam.nRow)
+ if (rArea.nTab == rParam.nTab && rArea.nRowEnd >= rParam.nRow)
bErr = true;
}
@@ -546,17 +546,17 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, bool bRecord )
if ( rParam.bByCol || rParam.bByRow )
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
- ScArea* pArea = rParam.ppDataAreas[nPos];
- aData.AddFields( &m_aDocument, pArea->nTab, pArea->nColStart, pArea->nRowStart,
- pArea->nColEnd, pArea->nRowEnd );
+ ScArea const & rArea = rParam.pDataAreas[nPos];
+ aData.AddFields( &m_aDocument, rArea.nTab, rArea.nColStart, rArea.nRowStart,
+ rArea.nColEnd, rArea.nRowEnd );
}
aData.DoneFields();
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
- ScArea* pArea = rParam.ppDataAreas[nPos];
- aData.AddData( &m_aDocument, pArea->nTab, pArea->nColStart, pArea->nRowStart,
- pArea->nColEnd, pArea->nRowEnd );
- aData.AddName( lcl_GetAreaName(&m_aDocument,pArea) );
+ ScArea const & rArea = rParam.pDataAreas[nPos];
+ aData.AddData( &m_aDocument, rArea.nTab, rArea.nColStart, rArea.nRowStart,
+ rArea.nColEnd, rArea.nRowEnd );
+ aData.AddName( lcl_GetAreaName(&m_aDocument, &rArea) );
}
aData.GetSize( nColSize, nRowSize );