summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-12-05 02:20:13 +0530
committerJan Holesovsky <kendy@collabora.com>2017-12-05 12:11:23 +0100
commitbcff1e08212f60d7bd38f357636cf6e12d006932 (patch)
treec24ba0cc63abe3d0c9f76127cbf1bd4aa55f2ee9 /sfx2/source
parentc24bfdbff68f52d65ca56cc4ff7d8377898180d7 (diff)
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
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/workwin.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index a030bb88e6bb..38e99da09612 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 "workwin.hrc"
@@ -1499,6 +1500,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;
@@ -1511,7 +1515,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) )