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 12:21:54 +0000
commitb2707c0545d7cc762a9ccfbb8a3b3cea495195e2 (patch)
treea632e2cdaf6adf9120404c9e7fbc907b4f7e251a
parent38f6065b0272ae4bc80f5f35866012b4ea0bc38b (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> (cherry picked from commit 2b6619c597a791775e2d41a68f7e85ef75d1aaa2) Reviewed-on: https://gerrit.libreoffice.org/11875
-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 e468dd3eb7bd..baf731412c54 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -76,6 +76,8 @@ bool ScDocument::CopyOneCellFromClip(
return false;
ScCellValue& rSrcCell = rCxt.getSingleCell();
+ const ScPatternAttr* pAttr = pClipDoc->GetPattern(aSrcPos);
+ rCxt.setSingleCellPattern(pAttr);
if (rCxt.isAsLink())
{
ScSingleRefData aRef;
@@ -89,8 +91,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.