summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-04-30 13:00:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-30 16:03:35 +0200
commit857caa5fc69b92e781457a1b67a89aa051c2d70f (patch)
tree7437d7f6345f9dea81f4203517549c48fa971eae /sfx2/source/view
parentb9097800f4f997de2325bc9e588e6caea7a563c7 (diff)
tdf#79049 speed up OOXML workbook load
we spend a lot of time in ScAttrArray::GetLastVisibleAttr which appears to be very expensive for this worksheet. This is re-computed every time we enter SfxBaseModel::getArgs Reduce the recomputation by introducing a new method which only retrieves specific SfxBaseModel arguments. This takes the load time from 5m9 to 1m9 for me. Change-Id: I605fae0faa94760c7d6993877c9559ea5dc813cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/frame2.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 3e96664527e0..990f46a53f86 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -381,7 +381,7 @@ bool SfxFrame::IsMenuBarOn_Impl() const
void SfxFrame::PrepareForDoc_Impl( SfxObjectShell& i_rDoc )
{
- const ::comphelper::NamedValueCollection aDocumentArgs( i_rDoc.GetModel()->getArgs() );
+ const ::comphelper::NamedValueCollection aDocumentArgs( i_rDoc.GetModel()->getArgs2( { "Hidden", "PluginMode" } ) );
// hidden?
OSL_ENSURE( !pImpl->bHidden, "when does this happen?" );
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index a74674a82917..8f5bfddba32d 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1224,7 +1224,8 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
if ( i_eConnect == E_CONNECT )
{
- ::comphelper::NamedValueCollection aDocumentArgs( getModel()->getArgs() );
+ css::uno::Reference<css::frame::XModel3> xModel(getModel(), css::uno::UNO_QUERY_THROW);
+ ::comphelper::NamedValueCollection aDocumentArgs( xModel->getArgs2( { "PluginMode" } ) );
const sal_Int16 nPluginMode = aDocumentArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
const bool bHasPluginMode = ( nPluginMode != 0 );