resolved fdo#79441 keep 3D references intact during sort

Change-Id: I9e96d8e7cb99a3c280dd24495eefb9efd6d10888
(cherry picked from commit e463de2a56453a0d2cb0b5b58e96f7639f37cdd1)
Reviewed-on: https://gerrit.libreoffice.org/10240
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
resolved fdo#77018 keep external references intact during sort

Needs e463de2a56453a0d2cb0b5b58e96f7639f37cdd1 fix for fdo#79441 to
work.

Change-Id: Ide1cbeb4b25b17b5102977ccbdf8e6dbfcadfc60
(cherry picked from commit db0a4c2575ffba1c170d74882b0f5a6229ec072f)
Reviewed-on: https://gerrit.libreoffice.org/10245
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
fdo#81309: Adjust references during sort.

(cherry picked from commit 5c6ee09126631342939ae8766fe36083d8c011e3)

Conflicts:
	sc/inc/sortparam.hxx
	sc/source/ui/docshell/dbdocfun.cxx
	sc/source/ui/undo/undodat.cxx
	sc/inc/formulacell.hxx
	sc/qa/unit/filters-test.cxx
	sc/qa/unit/ucalc.cxx
	sc/source/core/data/documen3.cxx
	sc/source/ui/docshell/dbdocfun.cxx

Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f