summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/dbdocfun.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/dbdocfun.cxx')
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index d22ce073a411..7f30a02f1eeb 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -48,6 +48,7 @@
#include "markdata.hxx"
#include "progress.hxx"
#include <undosort.hxx>
+#include <inputopt.hxx>
#include <set>
#include <memory>
@@ -551,8 +552,10 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
// don't call ScDocument::Sort with an empty SortParam (may be empty here if bCopy is set)
if (aLocalParam.GetSortKeyCount() && aLocalParam.maKeyState[0].bDoSort)
{
+ ScInputOptions aInputOption = SC_MOD()->GetInputOptions();
+ bool bUpdateRefs = aInputOption.GetSortRefUpdate();
ScProgress aProgress(&rDocShell, ScGlobal::GetRscString(STR_PROGRESS_SORTING), 0);
- rDoc.Sort(nTab, aLocalParam, bRepeatQuery, &aProgress, &aUndoParam);
+ rDoc.Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam);
}
if (bRecord)