Revert "tdf#43175: Adapt ranges when copying or moving several sheets"
because it causes failure in the tdf101894 part of UITest_chart
This reverts commit 3078044653f1e1b0a055c47eeb8d27834c07268a.
Change-Id: If187b7a1125eb6f85bb7329bd9029dc8236a85f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111822
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 814e3a0..1122264 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -3084,10 +3084,6 @@
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);
}
@@ -3137,6 +3133,9 @@
SetTabNo( nNewTab, true );
//#i29848# adjust references to data on the copied sheet
if( bCopy )
ScChartHelper::AdjustRangesOfChartsOnDestinationPage( rDoc, rDestDoc, nTab, nNewTab );
}
}