summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew J. Francis <mjay.francis@gmail.com>2014-10-09 13:02:18 +0800
committerKohei Yoshida <libreoffice@kohei.us>2014-10-09 11:38:12 +0000
commit2b6619c597a791775e2d41a68f7e85ef75d1aaa2 (patch)
tree840d27791c7a45a6516fcd8dbada81de01ebe4d2
parent14cccfab8111c61bf6707eef423abe79e95f5572 (diff)
fdo#84810 Avoid calc crash when using Paste Special - Link
Change-Id: I52c072578ccc0b9f75a850613056e74d400eb532 Reviewed-on: https://gerrit.libreoffice.org/11867 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--sc/source/core/data/document10.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index 5689a68816b0..5b286ec146b4 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -84,6 +84,8 @@ bool ScDocument::CopyOneCellFromClip(
return false;
ScCellValue& rSrcCell = rCxt.getSingleCell();
+ const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos);
+ rCxt.setSingleCellPattern(pAttr);
if (rCxt.isAsLink())
{
ScSingleRefData aRef;
@@ -97,8 +99,6 @@ bool ScDocument::CopyOneCellFromClip(
else
{
rSrcCell.set(pClipDoc->GetRefCellValue(aSrcPos));
- const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos);
- rCxt.setSingleCellPattern(pAttr);
// Check the paste flag to see whether we want to paste this cell. If the
// flag says we don't want to paste this cell, we'll return with true.