diff options
Diffstat (limited to 'sc/source/ui/view/tabvwshe.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwshe.cxx | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index fece06e7d8ec..fac15994f2ba 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -230,26 +230,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) const SvxSearchItem* pSearchItem = static_cast<const SvxSearchItem*>(pItem); ScGlobal::SetSearchItem( *pSearchItem ); - bool bSuccess = SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); - SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( - SvxSearchDialogWrapper::GetChildWindowId()); - if (pChildWindow) - { - SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get()); - if( pSearchDlg ) - { - ScTabView* pTabView = GetViewData().GetView(); - if( pTabView ) - { - vcl::Window* pWin = pTabView->GetActiveWin(); - if( pWin ) - { - pSearchDlg->SetDocWin( pWin, pSearchItem->GetCommand() ); - pSearchDlg->SetSrchFlag( bSuccess ); - } - } - } - } + SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); rReq.Done(); } } @@ -301,25 +282,6 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON : SfxCallMode::RECORD, { &aSearchItem }); - SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( - SvxSearchDialogWrapper::GetChildWindowId()); - if (pChildWindow) - { - SvxSearchDialog* pSearchDlg = static_cast<SvxSearchDialog*>(pChildWindow->GetController().get()); - if( pSearchDlg ) - { - ScTabView* pTabView = GetViewData().GetView(); - if( pTabView ) - { - vcl::Window* pWin = pTabView->GetActiveWin(); - if( pWin ) - { - pSearchDlg->SetDocWin( pWin, aSearchItem.GetCommand() ); - pSearchDlg->SetSrchFlag(false); - } - } - } - } } else { |