summaryrefslogtreecommitdiff
path: root/svx/source/dialog/srchdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/srchdlg.cxx')
-rw-r--r--svx/source/dialog/srchdlg.cxx22
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)