summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-20 15:45:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-20 20:48:29 +0200
commit90011180cb21186dbd58b8be6d7ffff23416541e (patch)
treedb088c1e87e7fd809b932c5f1fbca7d813db9e22 /sc
parent1f3c1b4ca12400348f30f30c2fb7ddfe2c71b2f7 (diff)
cid#1448415 Pointer to local outside scope
Change-Id: I35f20fa37a19ff921916cd0e8bb7bafbc66ec8b5 Reviewed-on: https://gerrit.libreoffice.org/76021 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column4.cxx4
-rw-r--r--sc/source/core/data/table7.cxx10
2 files changed, 7 insertions, 7 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 4485de036c8d..ac16dd2aa939 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -290,14 +290,14 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
// Duplicate the cell note over the whole pasted range.
ScDocument* pClipDoc = rCxt.getClipDoc();
- const ScAddress& rSrcPos = pClipDoc->GetClipParam().getWholeRange().aStart;
+ const ScAddress aSrcPos = pClipDoc->GetClipParam().getWholeRange().aStart;
std::vector<ScPostIt*> aNotes;
ScAddress aDestPos(nCol, nRow1, nTab);
aNotes.reserve(nDestSize);
for (size_t i = 0; i < nDestSize; ++i)
{
bool bCloneCaption = (nFlags & InsertDeleteFlags::NOCAPTIONS) == InsertDeleteFlags::NONE;
- aNotes.push_back(pNote->Clone(rSrcPos, *pDocument, aDestPos, bCloneCaption).release());
+ aNotes.push_back(pNote->Clone(aSrcPos, *pDocument, aDestPos, bCloneCaption).release());
aDestPos.IncRow();
}
diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index 48576f0d6018..203b1e417dbb 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -162,14 +162,14 @@ void ScTable::CopyOneCellFromClip(
OSL_ENSURE(pDrawLayer, "No drawing layer");
if (pDrawLayer)
{
- const ScAddress& rSrcStartPos
+ const ScAddress aSrcStartPos
= rCxt.getClipDoc()->GetClipParam().getWholeRange().aStart;
- const ScAddress& rSrcEndPos = rCxt.getClipDoc()->GetClipParam().getWholeRange().aEnd;
+ const ScAddress aSrcEndPos = rCxt.getClipDoc()->GetClipParam().getWholeRange().aEnd;
tools::Rectangle aSourceRect = rCxt.getClipDoc()->GetMMRect(
- rSrcStartPos.Col(), rSrcStartPos.Row(), rSrcEndPos.Col(), rSrcEndPos.Row(),
- rSrcStartPos.Tab());
+ aSrcStartPos.Col(), aSrcStartPos.Row(), aSrcEndPos.Col(), aSrcEndPos.Row(),
+ aSrcStartPos.Tab());
tools::Rectangle aDestRect = GetDoc().GetMMRect(nCol1, nRow1, nCol2, nRow2, nTab);
- pDrawLayer->CopyFromClip(rCxt.getClipDoc()->mpDrawLayer.get(), rSrcStartPos.Tab(),
+ pDrawLayer->CopyFromClip(rCxt.getClipDoc()->mpDrawLayer.get(), aSrcStartPos.Tab(),
aSourceRect, ScAddress(nCol1, nRow1, nTab), aDestRect);
}
}