[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 3 commits - sc/source vcl/qt5
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 27 06:39:43 UTC 2020
sc/source/ui/cctrl/checklistmenu.cxx | 64 +++++++++++++++++------------------
sc/source/ui/inc/checklistmenu.hxx | 2 -
vcl/qt5/Qt5Frame.cxx | 3 -
3 files changed, 34 insertions(+), 35 deletions(-)
New commits:
commit 842cacdb384b058a465b7b8abee813e19375edd5
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Jul 25 23:24:56 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jul 27 08:38:59 2020 +0200
tdf#135077 Qt5 revert broken fix for tdf#132172
So I tested a lot of stuff, but missed the missing focus for new
dialog windows :-( This is IMHO a far worse problem, then the
popup, so just revert the fix.
This reverts commit 14eccc62b53e202cd9ed63442481922a320fc02e.
Change-Id: I391ad91ded90e4518ab024572d3f182769b0bcda
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99453
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 25be0a1a4bc9..b38b92f143c9 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -758,8 +758,7 @@ void Qt5Frame::ToTop(SalFrameToTop nFlags)
pWidget->raise();
if ((nFlags & SalFrameToTop::RestoreWhenMin) || (nFlags & SalFrameToTop::ForegroundTask))
pWidget->activateWindow();
- else if ((nFlags & (SalFrameToTop::GrabFocus | SalFrameToTop::GrabFocusOnly))
- && pWidget->isVisible())
+ else if ((nFlags & SalFrameToTop::GrabFocus) || (nFlags & SalFrameToTop::GrabFocusOnly))
{
pWidget->activateWindow();
pWidget->setFocus();
commit a5c056b78f3e118e23b963c6a727b54f555a9d29
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri May 29 15:10:08 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jul 27 08:36:47 2020 +0200
fix tree disabled in autofilter pulldown, tdf#76481 related
regression from
commit f71557e958a8a626dfc1eef646b84b3c8b72569a
Date: Thu May 21 15:05:08 2020 +0200
tdf#76481 speed up searching in autofilter pulldown
Change-Id: Iac7fba87e12ae68a040706694ef94655113a6491
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95142
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit b81432a23c900329ece07854fd06a322225a97c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96173
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 664b63444748..0ddd31748958 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1230,7 +1230,7 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
{
// when there are a lot of rows, it is cheaper to simply clear the tree and re-initialise
maChecks->Clear();
- initMembers();
+ nSelCount = initMembers();
}
else
{
@@ -1888,11 +1888,12 @@ void ScCheckListMenuWindow::setHasDates(bool bHasDates)
maChecks->SetStyle(WB_HASBUTTONS);
}
-void ScCheckListMenuWindow::initMembers()
+size_t ScCheckListMenuWindow::initMembers()
{
size_t n = maMembers.size();
size_t nVisMemCount = 0;
+
maChecks->SetUpdateMode(false);
maChecks->GetModel()->EnableInvalidate(false);
@@ -1944,6 +1945,7 @@ void ScCheckListMenuWindow::initMembers()
maChecks->GetModel()->EnableInvalidate(true);
maChecks->SetUpdateMode(true);
+ return nVisMemCount;
}
void ScCheckListMenuWindow::setConfig(const Config& rConfig)
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 2ff574a15252..f9affb88f096 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -348,7 +348,7 @@ public:
void setHasDates(bool bHasDates);
void addDateMember(const OUString& rName, double nVal, bool bVisible);
void addMember(const OUString& rName, bool bVisible);
- void initMembers();
+ size_t initMembers();
void setConfig(const Config& rConfig);
bool isAllSelected() const;
commit 7a988bc0cc6cffdca9982cb154a9de4fb1cbcf24
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu May 21 15:05:08 2020 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jul 27 08:36:40 2020 +0200
tdf#76481 speed up searching in autofilter pulldown
turning setUpdateMode on/off fixes the common case, but we need to
special case the "return to show all items" situation
On my machine this takes the searching time from "more than 30s" to
"just under 1s"
Change-Id: I02d11c428e82dba1e840e981507337a1012dd09f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94633
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit f71557e958a8a626dfc1eef646b84b3c8b72569a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96172
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index b9b5acca11c8..664b63444748 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1222,20 +1222,27 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
bool bSearchTextEmpty = aSearchText.isEmpty();
size_t n = maMembers.size();
size_t nSelCount = 0;
- OUString aLabelDisp;
bool bSomeDateDeletes = false;
- for (size_t i = 0; i < n; ++i)
+ maChecks->SetUpdateMode(false);
+
+ if (bSearchTextEmpty)
+ {
+ // when there are a lot of rows, it is cheaper to simply clear the tree and re-initialise
+ maChecks->Clear();
+ initMembers();
+ }
+ else
{
- bool bIsDate = maMembers[i].mbDate;
- bool bPartialMatch = false;
+ for (size_t i = 0; i < n; ++i)
+ {
+ bool bIsDate = maMembers[i].mbDate;
+ bool bPartialMatch = false;
- aLabelDisp = maMembers[i].maName;
- if ( aLabelDisp.isEmpty() )
- aLabelDisp = ScResId( STR_EMPTYDATA );
+ OUString aLabelDisp = maMembers[i].maName;
+ if ( aLabelDisp.isEmpty() )
+ aLabelDisp = ScResId( STR_EMPTYDATA );
- if ( !bSearchTextEmpty )
- {
if ( !bIsDate )
bPartialMatch = ( ScGlobal::pCharClass->lowercase( aLabelDisp ).indexOf( aSearchText ) != -1 );
else if ( maMembers[i].meDatePartType == ScCheckListMember::DAY ) // Match with both numerical and text version of month
@@ -1243,30 +1250,19 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
maMembers[i].maRealName + maMembers[i].maDateParts[1] )).indexOf( aSearchText ) != -1);
else
continue;
- }
- else if ( bIsDate && maMembers[i].meDatePartType != ScCheckListMember::DAY )
- continue;
- if ( bSearchTextEmpty )
- {
- SvTreeListEntry* pLeaf = maChecks->ShowCheckEntry( aLabelDisp, maMembers[i], true, maMembers[i].mbVisible );
- updateMemberParents( pLeaf, i );
- if ( maMembers[i].mbVisible )
+ if ( bPartialMatch )
+ {
+ SvTreeListEntry* pLeaf = maChecks->ShowCheckEntry( aLabelDisp, maMembers[i] );
+ updateMemberParents( pLeaf, i );
++nSelCount;
- continue;
- }
-
- if ( bPartialMatch )
- {
- SvTreeListEntry* pLeaf = maChecks->ShowCheckEntry( aLabelDisp, maMembers[i] );
- updateMemberParents( pLeaf, i );
- ++nSelCount;
- }
- else
- {
- maChecks->ShowCheckEntry( aLabelDisp, maMembers[i], false, false );
- if( bIsDate )
- bSomeDateDeletes = true;
+ }
+ else
+ {
+ maChecks->ShowCheckEntry( aLabelDisp, maMembers[i], false, false );
+ if( bIsDate )
+ bSomeDateDeletes = true;
+ }
}
}
@@ -1280,6 +1276,8 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
}
}
+ maChecks->SetUpdateMode(true);
+
if ( nSelCount == n )
maChkToggleAll->SetState( TRISTATE_TRUE );
else if ( nSelCount == 0 )
More information about the Libreoffice-commits
mailing list