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 09:52:23 +0200 |
commit | 0b94169d820482434dc98a37c3c1633ca46fd0dc (patch) | |
tree | 4abb53646f1a6408d55aa36c0d7fe9c8c2039f96 /sw/source | |
parent | 13769dea65137fc3c537de6257d15cb87b51f8ae (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>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/access/accdoc.cxx | 72 | ||||
-rw-r--r-- | sw/source/core/access/accdoc.hxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 34 |
3 files changed, 1 insertions, 113 deletions
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 18ae284d440c..bf2c0e844a2b 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -24,7 +24,6 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> -#include <comphelper/accflowenum.hxx> #include <unotools/accessiblestatesethelper.hxx> #include <cppuhelper/typeprovider.hxx> #include <vcl/svapp.hxx> @@ -450,11 +449,6 @@ uno::Any SwAccessibleDocument::queryInterface( uno::Reference<XAccessibleExtendedAttributes> aAttribute = this; aRet <<= aAttribute; } - else if(rType == cppu::UnoType<XAccessibleGetAccFlowTo>::get()) - { - uno::Reference<XAccessibleGetAccFlowTo> AccFlowTo = this; - aRet <<= AccFlowTo; - } else aRet = SwAccessibleContext::queryInterface( rType ); return aRet; @@ -722,70 +716,4 @@ sal_Int32 SAL_CALL SwAccessibleDocument::getBackground() return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor); } -css::uno::Sequence< css::uno::Any > - SAL_CALL SwAccessibleDocument::getAccFlowTo(const css::uno::Any& /*rAny*/, sal_Int32 nType) -{ -#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG - AccessibilityFlowTo eType = static_cast<AccessibilityFlowTo>(nType); - assert(eType == AccessibilityFlowTo::ForFindReplaceItem || eType == AccessibilityFlowTo::ForFindReplaceRange); -#else - (void) nType; -#endif - - SolarMutexGuard g; - - SwAccessibleMap* pAccMap = GetMap(); - if ( !pAccMap ) - { - return uno::Sequence< uno::Any >(); - } - - SwCursorShell* pCursorShell = GetCursorShell(); - if ( pCursorShell ) - { - SwPaM *_pStartCursor = pCursorShell->GetCursor(), *_pStartCursor2 = _pStartCursor; - o3tl::sorted_vector<SwFrame*> vFrameList; - do - { - if ( !_pStartCursor ) - break; - if ( _pStartCursor->HasMark() ) - { - SwContentNode* pContentNode = _pStartCursor->GetContentNode(); - if (pContentNode) - { - SwFrame *const pFrame = pContentNode->getLayoutFrame(pCursorShell->GetLayout(), _pStartCursor->GetPoint()); - if ( pFrame ) - vFrameList.insert( pFrame ); - } - } - _pStartCursor = _pStartCursor->GetNext(); - } - while( _pStartCursor != _pStartCursor2 ); - - if ( !vFrameList.empty() ) - { - uno::Sequence< uno::Any > aRet(vFrameList.size()); - sal_Int32 nIndex = 0; - for ( const auto& rpFrame : vFrameList ) - { - uno::Reference< XAccessible > xAcc = pAccMap->GetContext(rpFrame, false); - if ( xAcc.is() ) - { - SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); - if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH ) - { - aRet[nIndex] <<= xAcc; - } - } - nIndex++; - } - aRet.realloc(nIndex); - return aRet; - } - } - - return uno::Sequence< uno::Any >(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx index eb4ec56bd499..452a62a3310c 100644 --- a/sw/source/core/access/accdoc.hxx +++ b/sw/source/core/access/accdoc.hxx @@ -22,7 +22,6 @@ #include "acccontext.hxx" #include <com/sun/star/accessibility/XAccessibleSelection.hpp> #include <com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp> -#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp> #include "accselectionhelper.hxx" // base class for SwAccessibleDocument (in this same header file) and @@ -91,8 +90,7 @@ public: */ class SwAccessibleDocument : public SwAccessibleDocumentBase, public css::accessibility::XAccessibleSelection, - public css::accessibility::XAccessibleExtendedAttributes, - public css::accessibility::XAccessibleGetAccFlowTo + public css::accessibility::XAccessibleExtendedAttributes { // Implementation for XAccessibleSelection interface SwAccessibleSelectionHelper maSelectionHelper; @@ -169,10 +167,6 @@ public: // XAccessibleComponent sal_Int32 SAL_CALL getBackground() override; - - // XAccessibleGetAccFlowTo - css::uno::Sequence< css::uno::Any > - SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index e2b9fb88fdeb..440b77ad7968 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -234,15 +234,6 @@ void SwView::ExecSearch(SfxRequest& rReq) lcl_emitSearchResultCallbacks(s_pSrchItem, m_pWrtShell.get(), /* bHighlightAll = */ false); } rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); -#if HAVE_FEATURE_DESKTOP - { - pSrchDlg = GetSearchDialog(); - if (pSrchDlg) - { - pSrchDlg->SetDocWin(m_pEditWin, eCommand, false); - } - } -#endif } break; case SvxSearchCmd::FIND_ALL: @@ -266,15 +257,6 @@ void SwView::ExecSearch(SfxRequest& rReq) else if (comphelper::LibreOfficeKit::isActive()) lcl_emitSearchResultCallbacks(s_pSrchItem, m_pWrtShell.get(), /* bHighlightAll = */ true); rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); -#if HAVE_FEATURE_DESKTOP - { - pSrchDlg = GetSearchDialog(); - if (pSrchDlg) - { - pSrchDlg->SetDocWin(m_pEditWin, eCommand, false); - } - } -#endif } break; case SvxSearchCmd::REPLACE: @@ -323,15 +305,6 @@ void SwView::ExecSearch(SfxRequest& rReq) s_pSrchItem->SetCommand( nOldCmd ); rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); } -#if HAVE_FEATURE_DESKTOP - { - pSrchDlg = GetSearchDialog(); - if (pSrchDlg) - { - pSrchDlg->SetDocWin(m_pEditWin, eCommand, false); - } - } -#endif break; case SvxSearchCmd::REPLACE_ALL: @@ -391,13 +364,6 @@ void SwView::ExecSearch(SfxRequest& rReq) SvxSearchDialogWrapper::SetSearchLabel(sText); } } -#if HAVE_FEATURE_DESKTOP - pSrchDlg = GetSearchDialog(); - if (pSrchDlg) - { - pSrchDlg->SetDocWin(m_pEditWin, eCommand, false); - } -#endif break; } |