sc/source/ui/view/tabvwshe.cxx | 46 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 20 deletions(-)
New commits: commit 71b491fd71f5ad1aa61f917992462009a6d1bb6b Author: Eike Rathke <[email protected]> Date: Fri Dec 13 20:00:49 2013 +0100 const as const can Change-Id: I0610bdee35fb7a36a183a5617115f3277af8e6a8 diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 39ae828..5f08498 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -237,7 +237,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) ScGlobal::SetSearchItem( *pSearchItem ); sal_Bool bSuccess = SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() ); - SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( + const SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId()); if (pChildWindow) { @@ -307,7 +307,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) rReq.IsAPI() ? SFX_CALLMODE_API|SFX_CALLMODE_SYNCHRON : SFX_CALLMODE_STANDARD, &aSearchItem, 0L ); - SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( + const SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( SvxSearchDialogWrapper::GetChildWindowId()); if (pChildWindow) { commit 6c91431eef31e35e7beb3c1272221d04d60ec2a2 Author: Eike Rathke <[email protected]> Date: Fri Dec 13 19:56:38 2013 +0100 maybe better guard against a NULL child window also here Change-Id: Iad65806894df2454e4341a49f473c308d47660eb diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 58e1159..39ae828 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -307,19 +307,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 ) + SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( + SvxSearchDialogWrapper::GetChildWindowId()); + if (pChildWindow) { - ScTabView* pTabView = GetViewData()->GetView(); - if( pTabView ) + SvxSearchDialog* pSearchDlg = (SvxSearchDialog*)(pChildWindow->GetWindow()); + if( pSearchDlg ) { - Window* pWin = pTabView->GetActiveWin(); - if( pWin ) + ScTabView* pTabView = GetViewData()->GetView(); + if( pTabView ) { - pSearchDlg->SetDocWin( pWin ); - pSearchDlg->SetSrchFlag(); + Window* pWin = pTabView->GetActiveWin(); + if( pWin ) + { + pSearchDlg->SetDocWin( pWin ); + pSearchDlg->SetSrchFlag(); + } } } } commit a0fb8a2eb12406b980537ca0190c6ddc33372947 Author: Eike Rathke <[email protected]> Date: Fri Dec 13 19:47:59 2013 +0100 fixed crash when searching via Find Text bar Introduced with b41332475783c31136673fb44cf4c411bb0148f8 Integrate branch of IAccessible2 Find Text bar is not the search dialog, so there is no child window unless the Find & Replace dialog is also open. Change-Id: Ice230cb2c05534c754fefc55bb8d8b189724d328 diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index 55f169b..58e1159 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -237,19 +237,22 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) ScGlobal::SetSearchItem( *pSearchItem ); sal_Bool bSuccess = SearchAndReplace( pSearchItem, sal_True, rReq.IsAPI() ); - SvxSearchDialog* pSearchDlg = - ((SvxSearchDialog*)(SfxViewFrame::Current()->GetChildWindow( - SvxSearchDialogWrapper::GetChildWindowId())->GetWindow())); - if( pSearchDlg ) + SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( + SvxSearchDialogWrapper::GetChildWindowId()); + if (pChildWindow) { - ScTabView* pTabView = GetViewData()->GetView(); - if( pTabView ) + SvxSearchDialog* pSearchDlg = (SvxSearchDialog*)(pChildWindow->GetWindow()); + if( pSearchDlg ) { - Window* pWin = pTabView->GetActiveWin(); - if( pWin ) + ScTabView* pTabView = GetViewData()->GetView(); + if( pTabView ) { - pSearchDlg->SetDocWin( pWin ); - pSearchDlg->SetSrchFlag( bSuccess ); + Window* pWin = pTabView->GetActiveWin(); + if( pWin ) + { + pSearchDlg->SetDocWin( pWin ); + pSearchDlg->SetSrchFlag( bSuccess ); + } } } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
