[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jul 13 16:50:00 UTC 2018
sfx2/source/appl/workwin.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit d5583743b86aaf34f3034e2bcf1c3c873320572e
Author: Pranav Kant <pranavk at collabora.co.uk>
AuthorDate: Tue Dec 5 02:20:13 2017 +0530
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Jul 13 18:49:35 2018 +0200
lokdialog: Don't hide dialogs in case of LOK
We change views (using setView) a lot in case of LOK. Changing the view,
without this patch, leads to InitShow on the dialog which means
invalidation of the whole dialog even though there is nothing to
invalidate. This decreases performance as it increases the dialog paint
traffic through the LOK API. We don't need to hide the dialog once it's
opened in case of LOK.
This patch improves the multiview dialog performance considerably
(can easily be noticed in GTV).
Change-Id: If2b4ceb945ccd86da3d90bbbb0a0b9fbade43f30
Reviewed-on: https://gerrit.libreoffice.org/57400
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 3a09ab31aa5a..c0ef612a7aa0 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -18,6 +18,7 @@
*/
#include <config_features.h>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/docfile.hxx>
@@ -1505,6 +1506,9 @@ bool SfxWorkWindow::IsVisible_Impl()
void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId )
{
+ if (comphelper::LibreOfficeKit::isActive() && bHide)
+ return;
+
for (SfxChildWin_Impl* i : aChildWins)
{
SfxChildWindow *pCW = i->pWin;
@@ -1517,7 +1521,8 @@ void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId )
pChild->nVisible &= ~SfxChildVisibility::ACTIVE;
pCW->Hide();
}
- else
+ else if ( !comphelper::LibreOfficeKit::isActive() ||
+ SfxChildVisibility::ACTIVE != (pChild->nVisible & SfxChildVisibility::ACTIVE) )
{
pChild->nVisible |= SfxChildVisibility::ACTIVE;
if ( SfxChildVisibility::VISIBLE == (pChild->nVisible & SfxChildVisibility::VISIBLE) )
More information about the Libreoffice-commits
mailing list