[Libreoffice-commits] core.git: framework/source
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jan 24 02:02:39 UTC 2021
framework/source/layoutmanager/helpers.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 27cec4edf112ba65d8c9d264c00cb39e2415a8cd
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Fri Jan 22 21:10:49 2021 +0000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sun Jan 24 03:01:40 2021 +0100
lok: avoid expensive fetching of a property.
--doc_setView
SfxLokHelper::setView
SfxViewFrame::MakeActive_Impl
SfxApplication::SetViewFrame_Impl
|
--SfxDispatcher::Update_Impl
|
--SfxWorkWindow::UpdateObjectBars_Impl
SfxWorkWindow::UpdateObjectBars_Impl2
|
--framework::LayoutManager::requestElement
framework::LayoutManager::createElement
|
--11.97%--framework::implts_isPreviewModel
We re-calculate the calc print-area on every setView via this
code-path; pointlessly expensive.
Change-Id: I36dbdc60a789fac4e2a82825b145725a4a4d6439
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109805
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index 7c620b699fcd..f5fe1fc48f44 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
+#include <comphelper/lok.hxx>
#include <unotools/mediadescriptor.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -261,6 +262,11 @@ uno::Reference< frame::XModel > impl_getModelFromFrame( const uno::Reference< fr
bool implts_isPreviewModel( const uno::Reference< frame::XModel >& xModel )
{
+ // the cost in calc of calling getArgs for this property
+ // includes measuring the entire sheet - which is extremely slow.
+ if (comphelper::LibreOfficeKit::isActive())
+ return false;
+
if ( xModel.is() )
{
utl::MediaDescriptor aDesc( xModel->getArgs() );
More information about the Libreoffice-commits
mailing list