summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew J. Francis <mjay.francis@gmail.com>2014-10-09 13:02:18 +0800
committerCaolán McNamara <caolanm@redhat.com>2014-10-10 08:12:54 +0000
commitaf79db308c86d200d9fb76001167511408c68bce (patch)
treece3c492df8412fe854b722f0a08f6a07ae0870a2
parent5d2d9f593ae4c8632684c86d559fa6fa744ae80b (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 (cherry picked from commit b2707c0545d7cc762a9ccfbb8a3b3cea495195e2) Reviewed-on: https://gerrit.libreoffice.org/11879 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-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.