sc/source/ui/dbgui/tpsort.cxx | 3 ++- sc/source/ui/unoobj/datauno.cxx | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 1c89de1ffce80e228eafca327d4f90a5c5487e55 Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Fri Jan 8 18:05:16 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Feb 16 11:58:20 2021 +0100 tdf#105301 - increase the size of the sorting keys During the import of a document, increase the number of shown sorting keys to match the actual size accordingly. Change-Id: I24ab596f47fadf33d0358f162d26b12c24615fa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108987 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de> (cherry picked from commit 788c777c6cdf2254e8bba05321f4a9de309b15b5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110916 diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index f8c2a996bd22..b70b8b591a84 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -82,7 +82,8 @@ ScTabPageSortFields::ScTabPageSortFields(weld::Container* pPage, weld::DialogCon rArgSet.Get( nWhichSort )). GetSortData() ), nFieldCount ( 0 ), - nSortKeyCount ( DEFSORT ), + // show actual size of the sorting keys without limiting them to the default size + nSortKeyCount(std::max(aSortData.GetSortKeyCount(), static_cast<sal_uInt16>(DEFSORT))), bHasHeader ( false ), bSortByRows ( false ) diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 2f2bdae144a4..68c1c2da8cd7 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -320,7 +320,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<beans::PropertyValue>& rSeq ) { - sal_Int16 nSortSize = rParam.GetSortKeyCount(); + sal_Int32 nSortSize = static_cast<sal_Int32>(rParam.GetSortKeyCount()); for (const beans::PropertyValue& rProp : rSeq) { @@ -357,7 +357,8 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b sal_Int32 i; if ( nCount > static_cast<sal_Int32>( rParam.GetSortKeyCount() ) ) { - nCount = nSortSize; + // tdf#105301 - increase the size of the sorting keys + nSortSize = nCount; rParam.maKeyState.resize(nCount); } const util::SortField* pFieldArray = aSeq.getConstArray(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits