[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source
Andreas Heinisch (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 16 10:58:57 UTC 2021
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.heinisch at yahoo.de>
AuthorDate: Fri Jan 8 18:05:16 2021 +0100
Commit: Xisco Fauli <xiscofauli at 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.kaganski at collabora.com>
Reviewed-by: Andreas Heinisch <andreas.heinisch at 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();
More information about the Libreoffice-commits
mailing list