sc/source/ui/dbgui/tpsort.cxx | 3 ++- sc/source/ui/unoobj/datauno.cxx | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 788c777c6cdf2254e8bba05321f4a9de309b15b5 Author: Andreas Heinisch <andreas.heini...@yahoo.de> AuthorDate: Fri Jan 8 18:05:16 2021 +0100 Commit: Andreas Heinisch <andreas.heini...@yahoo.de> CommitDate: Fri Feb 12 22:34:13 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> diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 4b37477b5c30..c0b84d022274 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 7d7876601709..8e8e54536037 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -321,7 +321,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) { @@ -358,7 +358,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