Kaydet (Commit) dc30fdcf authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) Jan Holesovsky

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/57401Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst c1817a5b
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include <config_features.h> #include <config_features.h>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <sfx2/docfile.hxx> #include <sfx2/docfile.hxx>
...@@ -1482,6 +1483,9 @@ bool SfxWorkWindow::IsVisible_Impl() ...@@ -1482,6 +1483,9 @@ bool SfxWorkWindow::IsVisible_Impl()
void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId ) void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId )
{ {
if (comphelper::LibreOfficeKit::isActive() && bHide)
return;
for (SfxChildWin_Impl* i : aChildWins) for (SfxChildWin_Impl* i : aChildWins)
{ {
SfxChildWindow *pCW = i->pWin; SfxChildWindow *pCW = i->pWin;
...@@ -1494,7 +1498,8 @@ void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId ) ...@@ -1494,7 +1498,8 @@ void SfxWorkWindow::HidePopups_Impl(bool bHide, bool bParent, sal_uInt16 nId )
pChild->nVisible &= ~SfxChildVisibility::ACTIVE; pChild->nVisible &= ~SfxChildVisibility::ACTIVE;
pCW->Hide(); pCW->Hide();
} }
else else if ( !comphelper::LibreOfficeKit::isActive() ||
SfxChildVisibility::ACTIVE != (pChild->nVisible & SfxChildVisibility::ACTIVE) )
{ {
pChild->nVisible |= SfxChildVisibility::ACTIVE; pChild->nVisible |= SfxChildVisibility::ACTIVE;
if ( SfxChildVisibility::VISIBLE == (pChild->nVisible & SfxChildVisibility::VISIBLE) ) if ( SfxChildVisibility::VISIBLE == (pChild->nVisible & SfxChildVisibility::VISIBLE) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment