diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2014-09-27 07:59:04 +0200 |
---|---|---|
committer | Kohei Yoshida <libreoffice@kohei.us> | 2014-09-30 13:51:55 +0000 |
commit | 31432c4469e7e0d05516143533d6b5e0b411dda3 (patch) | |
tree | 9f460ee4a6e3ca4f2cc6e40d2d6dc398749087eb /sc/source | |
parent | 9db2eeea92d3a1e0571ae91eb74e218662732be9 (diff) |
fdo#53920 Switch back tab at RefButton closure time
Bug occurs because visible tab is not the initial tab. So, instead of
switching back to initial tab at dialog closure time (removed from
cellsh2.cxx), this commit proposes that switching back to initial tab
is operate when expanding the RefButton shrink dialog.
Change-Id: I3cf7ed14054fa69881d4ecbc55c48dfbfc4356aa
Reviewed-on: https://gerrit.libreoffice.org/11660
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/dbgui/validate.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 31b2a08b8186..ca3333beb2d3 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -151,11 +151,21 @@ void ScTPValidationValue::RefInputDonePostHdl() m_pBtnRef->SetParent( m_pRefGrid ); if ( ScValidationDlg *pValidationDlg = GetValidationDlg() ) + { pValidationDlg->get_refinput_shrink_parent()->Hide(); + ScViewData& rViewData = pValidationDlg->GetTabViewShell()->GetViewData(); + SCTAB nCurTab = rViewData.GetTabNo(); + SCTAB nRefTab = rViewData.GetRefTabNo(); + // If RefInput switched to a different sheet from the data sheet, + // switch back: fdo#53920 + if ( nCurTab != nRefTab ) + { + rViewData.GetViewShell()->SetTabNo( nRefTab ); + } + } if( m_pRefEdit && !m_pRefEdit->HasFocus() ) m_pRefEdit->GrabFocus(); - } namespace { diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index df91eebb1040..11e0166ef5dd 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -847,8 +847,6 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) assert(pDlg); //Dialog create fail! short nResult = pDlg->Execute(); - //When picking Cell Range, other Tab may be switched. Need restore the correct tab - pTabViewShell->SetTabNo( nTab ); if ( nResult == RET_OK ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); |