diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-23 15:30:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-23 21:51:39 +0200 |
commit | 12eb32fccec16a436a6c3eca725b9d6d449f8e19 (patch) | |
tree | f57507d003ef927e311bc877569839afd68943ae /svx/source | |
parent | 00d06dee4b77cf52c927bd2c8687bb1a8d6c7904 (diff) |
Resolves: tdf#128313 disambiguate flow-to search results
for a11y between find/replace where our result is a single thing, and
find-all/replace-all where the result is potentially many things, which allows
that searching in a selected calc column will flow-to the current cell, not the
entire ~infinite set of cells in the column
Change-Id: Ib3e56fceb90d869f157427f090cdffe986a5a588
Reviewed-on: https://gerrit.libreoffice.org/81396
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index ef831b92f2bf..3d51c2bc7f53 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2287,7 +2287,7 @@ void SvxSearchDialog::SaveToModule_Impl() rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SfxCallMode::SLOT, ppArgs ); } -void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin) +void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand) { m_xDialog->clear_extra_accessible_relations(); @@ -2305,7 +2305,25 @@ void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin) return; } - uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), AccessibilityFlowTo::FORFINDREPLACEFLOWTO); + /* 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::FORFINDREPLACEFLOWTO_ITEM); + switch (eCommand) + { + case SvxSearchCmd::FIND: + case SvxSearchCmd::REPLACE: + eFlowTo = AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM; + break; + case SvxSearchCmd::FIND_ALL: + case SvxSearchCmd::REPLACE_ALL: + eFlowTo = AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE; + break; + } + uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), eFlowTo); sal_Int32 nLen = aAnySeq.getLength(); if (nLen) |