diff options
Diffstat (limited to 'sc/source/ui/view/viewfun2.cxx')
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 112226405232..814e3a05b7b3 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -3084,6 +3084,10 @@ void ScViewFunc::MoveTable( nDestTab1=nTabCount; } } + //If sheets are copied or renamed when moved, the references to the data inside the sheets have to be adapted + if (bCopy || bRename) + ScChartHelper::AdjustRangesOfChartsOnDestinationPage(rDoc, rDestDoc, nMovTab, + nDestTab1); pDestTabs->push_back(nDestTab1); } @@ -3133,9 +3137,6 @@ void ScViewFunc::MoveTable( SetTabNo( nNewTab, true ); - //#i29848# adjust references to data on the copied sheet - if( bCopy ) - ScChartHelper::AdjustRangesOfChartsOnDestinationPage( rDoc, rDestDoc, nTab, nNewTab ); } } |