From d452e6b67bfffc4eacb1049c67a493811c306e2b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 23 Mar 2022 18:53:40 +0300 Subject: [PATCH] [SSE] Fix Bug 56225 --- .../main/app/controller/DocumentHolder.js | 8 +++++--- .../mobile/src/controller/CellEditor.jsx | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index b21b03b87..2ad3a6700 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -2451,13 +2451,15 @@ define([ } funcarr.sort(function (a,b) { var atype = a.asc_getType(), - btype = b.asc_getType(), - aname = a.asc_getName(true).toLocaleUpperCase(), - bname = b.asc_getName(true).toLocaleUpperCase(); + btype = b.asc_getType(); + if (atype===btype && (atype === Asc.c_oAscPopUpSelectorType.TableColumnName)) + return 0; if (atype === Asc.c_oAscPopUpSelectorType.TableThisRow) return -1; if (btype === Asc.c_oAscPopUpSelectorType.TableThisRow) return 1; if ((atype === Asc.c_oAscPopUpSelectorType.TableColumnName || btype === Asc.c_oAscPopUpSelectorType.TableColumnName) && atype !== btype) return atype === Asc.c_oAscPopUpSelectorType.TableColumnName ? -1 : 1; + var aname = a.asc_getName(true).toLocaleUpperCase(), + bname = b.asc_getName(true).toLocaleUpperCase(); if (aname < bname) return -1; if (aname > bname) return 1; return 0; diff --git a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx index 1f99abb82..0b4dfc2ff 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx @@ -47,14 +47,15 @@ const CellEditor = inject("storeFunctions")(observer(props => { if(funcArr) { funcArr.sort(function (a, b) { let atype = a.asc_getType(), - btype = b.asc_getType(), - aname = a.asc_getName(true).toLocaleUpperCase(), - bname = b.asc_getName(true).toLocaleUpperCase(); - + btype = b.asc_getType(); + if (atype===btype && (atype === Asc.c_oAscPopUpSelectorType.TableColumnName)) + return 0; if (atype === Asc.c_oAscPopUpSelectorType.TableThisRow) return -1; if (btype === Asc.c_oAscPopUpSelectorType.TableThisRow) return 1; if ((atype === Asc.c_oAscPopUpSelectorType.TableColumnName || btype === Asc.c_oAscPopUpSelectorType.TableColumnName) && atype !== btype) return atype === Asc.c_oAscPopUpSelectorType.TableColumnName ? -1 : 1; + let aname = a.asc_getName(true).toLocaleUpperCase(), + bname = b.asc_getName(true).toLocaleUpperCase(); if (aname < bname) return -1; if (aname > bname) return 1;