diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-27 17:38:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-28 14:40:35 +0200 |
commit | 51b40687d41aab9576dd4e2620c3cd5231732d58 (patch) | |
tree | 148121e4f1dc67e3bbae33c02f49b0a9da52ccb8 /sc | |
parent | 3e78c8b75c2a170b13395e86d6978946a1acbe7c (diff) |
Resolves: tdf#133411 drop CONTENT_FLOWS_TO from dialog to search results
in the document, looks like only the calc one actually works, and when
it works on large quantities of results calc grinds to a complete halt
This was introduced with:
commit b41332475783c31136673fb44cf4c411bb0148f8
Date: Mon Dec 2 15:54:29 2013 +0000
Integrate branch of IAccessible2
and has been a problem on and off with calc's potentially ~infinite grid
There is the on-by-default search results dialog in calc (which has a limit on
how many it shows) which provides an alternative route to iterate through the
results
Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 0b94169d820482434dc98a37c3c1633ca46fd0dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95012
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleDocument.cxx | 94 | ||||
-rw-r--r-- | sc/source/ui/inc/AccessibleDocument.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshe.cxx | 38 |
3 files changed, 2 insertions, 137 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 4dfc5848a0b3..f7f2c8aed866 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -52,7 +52,6 @@ #include <svx/AccessibleShapeTreeInfo.hxx> #include <svx/AccessibleShapeInfo.hxx> #include <svx/IAccessibleParent.hxx> -#include <comphelper/accflowenum.hxx> #include <comphelper/sequence.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> @@ -1616,13 +1615,6 @@ void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& / uno::Any SAL_CALL ScAccessibleDocument::queryInterface( uno::Type const & rType ) { - uno::Any aAnyTmp; - if(rType == cppu::UnoType<XAccessibleGetAccFlowTo>::get()) - { - css::uno::Reference<XAccessibleGetAccFlowTo> AccFromXShape = this; - aAnyTmp <<= AccFromXShape; - return aAnyTmp; - } uno::Any aAny (ScAccessibleDocumentImpl::queryInterface(rType)); return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType); } @@ -2234,92 +2226,6 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes() return anyAtrribute; } -css::uno::Sequence< css::uno::Any > ScAccessibleDocument::GetScAccFlowToSequence() -{ - if ( getAccessibleChildCount() ) - { - uno::Reference < XAccessible > xSCTableAcc = getAccessibleChild( 0 ); // table - if ( xSCTableAcc.is() ) - { - uno::Reference < XAccessibleSelection > xAccSelection( xSCTableAcc, uno::UNO_QUERY ); - sal_Int32 nSelCount = xAccSelection->getSelectedAccessibleChildCount(); - if( nSelCount ) - { - uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); // selected cell - if ( xSel.is() ) - { - uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() ); - if ( xSelContext.is() ) - { - if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL ) - { - sal_Int32 nParaCount = 0; - uno::Sequence <uno::Any> aSequence(nSelCount); - for ( sal_Int32 i = 0; i < nSelCount; i++ ) - { - xSel = xAccSelection->getSelectedAccessibleChild( i ) ; - if ( xSel.is() ) - { - xSelContext = xSel->getAccessibleContext(); - if ( xSelContext.is() ) - { - if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL ) - { - aSequence[nParaCount] <<= xSel; - nParaCount++; - } - } - } - } - aSequence.realloc(nParaCount); - return aSequence; - } - } - } - } - } - } - uno::Sequence <uno::Any> aEmpty; - return aEmpty; -} - -css::uno::Sequence< css::uno::Any > - SAL_CALL ScAccessibleDocument::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) -{ - AccessibilityFlowTo eType = static_cast<AccessibilityFlowTo>(nType); - -#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - assert(eType == AccessibilityFlowTo::ForFindReplaceItem || eType == AccessibilityFlowTo::ForFindReplaceRange); -#endif - - SolarMutexGuard g; - - bool bSuccess(false); - rAny >>= bSuccess; - if ( bSuccess ) - { - if (eType == AccessibilityFlowTo::ForFindReplaceRange) - { - uno::Sequence< uno::Any> aSeq = GetScAccFlowToSequence(); - if ( aSeq.hasElements() ) - { - return aSeq; - } - } - - if( mpAccessibleSpreadsheet.is() ) - { - uno::Reference < XAccessible > xFindCellAcc = mpAccessibleSpreadsheet->GetActiveCell(); - // add xFindCellAcc to the return the Sequence - uno::Sequence< uno::Any> aSeq2(1); - aSeq2[0] <<= xFindCellAcc; - return aSeq2; - } - } - uno::Sequence< uno::Any> aEmpty; - return aEmpty; -} - sal_Int32 SAL_CALL ScAccessibleDocument::getForeground( ) { return sal_Int32(COL_BLACK); diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx index 731c6a9628e2..364fbcb3e7c9 100644 --- a/sc/source/ui/inc/AccessibleDocument.hxx +++ b/sc/source/ui/inc/AccessibleDocument.hxx @@ -26,7 +26,6 @@ #include <com/sun/star/view/XSelectionChangeListener.hpp> #include <cppuhelper/implbase3.hxx> #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp> -#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp> #include <svx/IAccessibleViewForwarder.hxx> class ScTabViewShell; @@ -53,7 +52,6 @@ typedef cppu::ImplHelper3< css::accessibility::XAccessibleSelection, class ScAccessibleDocument : public ScAccessibleDocumentBase, public ScAccessibleDocumentImpl, - public css::accessibility::XAccessibleGetAccFlowTo, public accessibility::IAccessibleViewForwarder { public: @@ -258,11 +256,8 @@ private: public: ScDocument *GetDocument() const ; ScAddress GetCurCellAddress() const; - //===== XAccessibleGetAccFromXShape ============================================ - css::uno::Sequence< css::uno::Any > - SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override; - virtual sal_Int32 SAL_CALL getForeground( ) override; + virtual sal_Int32 SAL_CALL getForeground( ) override; virtual sal_Int32 SAL_CALL getBackground( ) override; }; diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 74dfe9001dcd..138d154e046a 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -247,25 +247,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) const SvxSearchItem* pSearchItem = static_cast<const SvxSearchItem*>(pItem); ScGlobal::SetSearchItem( *pSearchItem ); - bool bSuccess = SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); - SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( - SvxSearchDialogWrapper::GetChildWindowId()); - if (pChildWindow) - { - SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get()); - if( pSearchDlg ) - { - ScTabView* pTabView = GetViewData().GetView(); - if( pTabView ) - { - vcl::Window* pWin = pTabView->GetActiveWin(); - if( pWin ) - { - pSearchDlg->SetDocWin(pWin, pSearchItem->GetCommand(), bSuccess); - } - } - } - } + SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); rReq.Done(); } } @@ -317,24 +299,6 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON : SfxCallMode::RECORD, { &aSearchItem }); - SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( - SvxSearchDialogWrapper::GetChildWindowId()); - if (pChildWindow) - { - SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get()); - if( pSearchDlg ) - { - ScTabView* pTabView = GetViewData().GetView(); - if( pTabView ) - { - vcl::Window* pWin = pTabView->GetActiveWin(); - if( pWin ) - { - pSearchDlg->SetDocWin(pWin, aSearchItem.GetCommand(), false); - } - } - } - } } else { |