diff options
author | Steve Yin <steve_y@apache.org> | 2013-12-02 15:54:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-02 16:41:08 +0000 |
commit | b41332475783c31136673fb44cf4c411bb0148f8 (patch) | |
tree | 39ba57867ed6ae3f39e60c38180f800542067b49 /sc/source/ui/view/tabvwshe.cxx | |
parent | 23fdf75cd6e6cb37bfeac08f503a15d07d9beda9 (diff) |
Integrate branch of IAccessible2
Conflicts:
everything
Change-Id: I3d8cf956f511a0d953a1cefe83b6ef987806da25
Diffstat (limited to 'sc/source/ui/view/tabvwshe.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwshe.cxx | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 1546afa45a32..55f169b724c8 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -38,6 +38,7 @@ #include "editsh.hxx" #include "dociter.hxx" #include "inputhdl.hxx" +#include <svx/srchdlg.hxx> #include "document.hxx" //================================================================== @@ -235,7 +236,23 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) const SvxSearchItem* pSearchItem = (const SvxSearchItem*) pItem; ScGlobal::SetSearchItem( *pSearchItem ); - SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() ); + sal_Bool bSuccess = SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() ); + SvxSearchDialog* pSearchDlg = + ((SvxSearchDialog*)(SfxViewFrame::Current()->GetChildWindow( + SvxSearchDialogWrapper::GetChildWindowId())->GetWindow())); + if( pSearchDlg ) + { + ScTabView* pTabView = GetViewData()->GetView(); + if( pTabView ) + { + Window* pWin = pTabView->GetActiveWin(); + if( pWin ) + { + pSearchDlg->SetDocWin( pWin ); + pSearchDlg->SetSrchFlag( bSuccess ); + } + } + } rReq.Done(); } } @@ -287,6 +304,22 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) rReq.IsAPI() ? SFX_CALLMODE_API|SFX_CALLMODE_SYNCHRON : SFX_CALLMODE_STANDARD, &aSearchItem, 0L ); + SvxSearchDialog* pSearchDlg = + ((SvxSearchDialog*)(SfxViewFrame::Current()->GetChildWindow( + SvxSearchDialogWrapper::GetChildWindowId())->GetWindow())); + if( pSearchDlg ) + { + ScTabView* pTabView = GetViewData()->GetView(); + if( pTabView ) + { + Window* pWin = pTabView->GetActiveWin(); + if( pWin ) + { + pSearchDlg->SetDocWin( pWin ); + pSearchDlg->SetSrchFlag(); + } + } + } } else { |