summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-15 02:13:39 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-01-16 14:44:04 +0100
commit9b7d7322401da8ce42affb9e6bd408311b383ec4 (patch)
treeb3bfaf106abbb52208f89bd7dcdae3a38969d6cc /sc
parent5a9bc29a7a387e6659291f4ea195f09a4bde30a2 (diff)
make adjusting formulas possible for TransferTab
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docsh5.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index d0535614cdd4..b965d5059cae 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -65,6 +65,7 @@
#include "sc.hrc"
#include "waitoff.hxx"
#include "sizedev.hxx"
+#include "clipparam.hxx"
#include <basic/sbstar.hxx>
#include <basic/basmgr.hxx>
@@ -850,6 +851,12 @@ sal_uLong ScDocShell::TransferTab( ScDocShell& rSrcDocShell, SCTAB nSrcPos,
{
ScDocument* pSrcDoc = rSrcDocShell.GetDocument();
+ // set the transfered area to the copyparam to make adjusting formulas possible
+ ScClipParam aParam;
+ ScRange aRange(0, 0, nSrcPos, MAXCOL, MAXROW, nSrcPos);
+ aParam.maRanges.Append(aRange);
+ pSrcDoc->SetClipParam(aParam);
+
sal_uLong nErrVal = aDocument.TransferTab( pSrcDoc, nSrcPos, nDestPos,
bInsertNew ); // no insert