diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-27 16:10:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-07-28 11:35:55 +0200 |
commit | 192d97cdf091af08a492416824918ea447bfb16f (patch) | |
tree | ad9a2717eff6a7a9561a56b7f8c1c2477af24c30 /sc/source/ui/unoobj/viewuno.cxx | |
parent | 42dacdf2d1c90a4b80fefeb49cbcc08dcbf70a96 (diff) |
Resolves: tdf#106872 only request selected shapes
that way we can avoid the super slow code path for filtered
rows when we only care about selected shapes
Change-Id: I175fa841e406dbbe7075296f2e0a0e79fa115fb7
Reviewed-on: https://gerrit.libreoffice.org/40496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/source/ui/unoobj/viewuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 6abd3678be04..3d54ee808868 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -848,12 +848,13 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) return bRet; } -namespace +uno::Reference<drawing::XShapes> ScTabViewShell::getSelectedXShapes() { - uno::Reference<drawing::XShapes> getSelectedShapes(SdrView& rDrawView) + uno::Reference<drawing::XShapes> xShapes; + SdrView* pSdrView = GetSdrView(); + if (pSdrView) { - uno::Reference<drawing::XShapes> xShapes; - const SdrMarkList& rMarkList = rDrawView.GetMarkedObjectList(); + const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); const size_t nMarkCount = rMarkList.GetMarkCount(); if (nMarkCount) { @@ -872,8 +873,8 @@ namespace } } } - return xShapes; } + return xShapes; } uno::Any SAL_CALL ScTabViewObj::getSelection() @@ -884,13 +885,9 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() if (pViewSh) { // is something selected in drawing layer? - SdrView* pDrawView = pViewSh->GetSdrView(); - if (pDrawView) - { - uno::Reference<uno::XInterface> xRet(getSelectedShapes(*pDrawView)); - if (xRet.is()) - return uno::makeAny(xRet); - } + uno::Reference<uno::XInterface> xRet(pViewSh->getSelectedXShapes()); + if (xRet.is()) + return uno::makeAny(xRet); // otherwise sheet (cell) selection |