[Libreoffice-commits] core.git: include/svx sc/source sd/source svx/source sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 28 07:52:31 UTC 2020
include/svx/srchdlg.hxx | 6 +-----
sc/source/ui/view/tabvwshe.cxx | 6 ++----
sd/source/ui/view/Outliner.cxx | 3 +--
svx/source/dialog/srchdlg.cxx | 5 ++---
sw/source/uibase/uiview/viewsrch.cxx | 12 ++++--------
5 files changed, 10 insertions(+), 22 deletions(-)
New commits:
commit 13769dea65137fc3c537de6257d15cb87b51f8ae
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 27 17:11:34 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 28 09:51:50 2020 +0200
Related: tdf#133411 SetDocWin is using the previous search success state
not the new state
The order of calls probably didn't matter in the past where the use of the flag
was deferred until the Accessibility data was queried which would happen in
another event loop.
This makes it more clear that it appears that only calc actually does anything
productive here.
I think this flow-to has created more trouble that its worth and I'll remove it
but if we need to restore it, then this, I think, it the working state to
restore to.
Change-Id: Id6fbb483c081f6d5142100d70c1b29705dcb6452
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95005
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 5c27e2de9e79..593d54487964 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -128,16 +128,12 @@ public:
TransliterationFlags GetTransliterationFlags() const;
- void SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand);
- void SetSrchFlag( bool bSuccess ) { mbSuccess = bSuccess; }
- bool GetSrchFlag() const { return mbSuccess; }
+ void SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand, bool bSuccess);
void SetSaveToModule(bool b);
void SetSearchLabel(const OUString& rStr);
private:
- bool mbSuccess;
-
SfxBindings& rBindings;
bool bWriter;
bool bSearch;
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index d3fa448a6538..74dfe9001dcd 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -261,8 +261,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
vcl::Window* pWin = pTabView->GetActiveWin();
if( pWin )
{
- pSearchDlg->SetDocWin( pWin, pSearchItem->GetCommand() );
- pSearchDlg->SetSrchFlag( bSuccess );
+ pSearchDlg->SetDocWin(pWin, pSearchItem->GetCommand(), bSuccess);
}
}
}
@@ -331,8 +330,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq )
vcl::Window* pWin = pTabView->GetActiveWin();
if( pWin )
{
- pSearchDlg->SetDocWin( pWin, aSearchItem.GetCommand() );
- pSearchDlg->SetSrchFlag(false);
+ pSearchDlg->SetDocWin(pWin, aSearchItem.GetCommand(), false);
}
}
}
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index e7f676f43e4e..b065a5c8d86f 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -480,8 +480,7 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
{
SvxSearchDialog* pSearchDlg =
static_cast<SvxSearchDialog*>(pChildWin->GetController().get());
- pSearchDlg->SetDocWin( pViewShell->GetActiveWindow(), nCommand );
- pSearchDlg->SetSrchFlag(false);
+ pSearchDlg->SetDocWin(pViewShell->GetActiveWindow(), nCommand, false);
}
}
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index ffd8d0e90adb..474e75535924 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -258,7 +258,6 @@ void SearchAttrItemList::Remove(size_t nPos)
SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind)
: SfxModelessDialogController(&rBind, pChildWin, pParent,
"svx/ui/findreplacedialog.ui", "FindReplaceDialog")
- , mbSuccess(false)
, rBindings(rBind)
, bWriter(false)
, bSearch(true)
@@ -2284,7 +2283,7 @@ void SvxSearchDialog::SaveToModule_Impl()
rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SfxCallMode::SLOT, ppArgs );
}
-void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand)
+void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand, bool bSuccess)
{
m_xDialog->clear_extra_accessible_relations();
@@ -2320,7 +2319,7 @@ void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand)
eFlowTo = AccessibilityFlowTo::ForFindReplaceRange;
break;
}
- uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), static_cast<sal_Int32>(eFlowTo));
+ uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(bSuccess), static_cast<sal_Int32>(eFlowTo));
sal_Int32 nLen = aAnySeq.getLength();
if (nLen)
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 55ca1a9c5f06..e2b9fb88fdeb 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -239,8 +239,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
pSrchDlg = GetSearchDialog();
if (pSrchDlg)
{
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
+ pSrchDlg->SetDocWin(m_pEditWin, eCommand, false);
}
}
#endif
@@ -272,8 +271,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
pSrchDlg = GetSearchDialog();
if (pSrchDlg)
{
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
+ pSrchDlg->SetDocWin(m_pEditWin, eCommand, false);
}
}
#endif
@@ -330,8 +328,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
pSrchDlg = GetSearchDialog();
if (pSrchDlg)
{
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
+ pSrchDlg->SetDocWin(m_pEditWin, eCommand, false);
}
}
#endif
@@ -398,8 +395,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
pSrchDlg = GetSearchDialog();
if (pSrchDlg)
{
- pSrchDlg->SetDocWin(m_pEditWin, eCommand);
- pSrchDlg->SetSrchFlag(false);
+ pSrchDlg->SetDocWin(m_pEditWin, eCommand, false);
}
#endif
break;
More information about the Libreoffice-commits
mailing list