[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - framework/source
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 28 14:34:19 UTC 2021
framework/source/layoutmanager/helpers.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit ba18bb5729a01d3325ebf554263af6cf7a475c28
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: Thu Jan 28 15:33:46 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/+/109836
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index bb858b33b5e7..c39c22788c70 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -29,6 +29,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>
@@ -262,6 +263,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