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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 474e75535924..adab6f86b642 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -34,9 +34,6 @@ #include <svl/cjkoptions.hxx> #include <svl/ctloptions.hxx> #include <com/sun/star/awt/XWindow.hpp> -#include <com/sun/star/accessibility/AccessibleRelation.hpp> -#include <com/sun/star/accessibility/AccessibleRelationType.hpp> -#include <com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> @@ -46,7 +43,6 @@ #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/ui/XUIElement.hpp> -#include <comphelper/accflowenum.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/scopeguard.hxx> #include <svl/itempool.hxx> @@ -2283,58 +2279,6 @@ void SvxSearchDialog::SaveToModule_Impl() rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SfxCallMode::SLOT, ppArgs ); } -void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand, bool bSuccess) -{ - m_xDialog->clear_extra_accessible_relations(); - - if (!pDocWin) - return; - - Reference<css::accessibility::XAccessible> xDocAcc = pDocWin->GetAccessible(); - if (!xDocAcc.is()) - { - return; - } - Reference<css::accessibility::XAccessibleGetAccFlowTo> xGetAccFlowTo(xDocAcc, UNO_QUERY); - if (!xGetAccFlowTo.is()) - { - return; - } - - /* tdf#128313 FlowTo tries to set an a11y relation between the search dialog - and its results. But for "find/replace" within a calc column we don't - want to return the entire column as the result, we want the current cell. - - But with search/all we do want the new multi-cellselection as the result. - */ - AccessibilityFlowTo eFlowTo(AccessibilityFlowTo::ForFindReplaceItem); - switch (eCommand) - { - case SvxSearchCmd::FIND: - case SvxSearchCmd::REPLACE: - eFlowTo = AccessibilityFlowTo::ForFindReplaceItem; - break; - case SvxSearchCmd::FIND_ALL: - case SvxSearchCmd::REPLACE_ALL: - eFlowTo = AccessibilityFlowTo::ForFindReplaceRange; - break; - } - uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(bSuccess), static_cast<sal_Int32>(eFlowTo)); - - sal_Int32 nLen = aAnySeq.getLength(); - if (nLen) - { - uno::Sequence<uno::Reference<uno::XInterface>> aSequence(nLen); - std::transform(aAnySeq.begin(), aAnySeq.end(), aSequence.begin(), - [](const uno::Any& rAny) -> uno::Reference < css::accessibility::XAccessible > { - uno::Reference < css::accessibility::XAccessible > xAcc; - rAny >>= xAcc; - return xAcc; - }); - m_xDialog->add_extra_accessible_relation(css::accessibility::AccessibleRelation(css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence)); - } -} - short SvxSearchDialog::executeSubDialog(VclAbstractDialog * dialog) { assert(!m_executingSubDialog); comphelper::ScopeGuard g([this] { m_executingSubDialog = false; }); |