diff options
author | Henry Castro <hcastro@collabora.com> | 2016-10-24 22:15:45 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2016-10-25 11:07:33 +0000 |
commit | 97f0fbe5830a5d2119fe9f5e8142fe45b255c2ac (patch) | |
tree | 6bb272281f2774ee1a6197cb0c9a3a492117cc82 /sc/source/ui/app | |
parent | 8a063e2f2a4081234aaf538751bb1bb3c68bd8f8 (diff) |
tdf#103409: No selection outline displayed when SUM button is clicked
Change-Id: I8a1bb22bd0be9717a56a90732b17c4ed8f230bf3
Reviewed-on: https://gerrit.libreoffice.org/30254
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index e0d961bc98ec..352483105ffc 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -331,10 +331,35 @@ void ScInputWindow::Select() ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() ); if ( pViewSh ) { - const OUString aFormula = pViewSh->DoAutoSum(); + bool bSubTotal = false; + bool bRangeFinder = false; + const OUString aFormula = pViewSh->DoAutoSum(bRangeFinder, bSubTotal); if (!aFormula.isEmpty()) { SetFuncString( aFormula ); + if (bRangeFinder && pScMod->IsEditMode()) + { + ScInputHandler* pHdl = pScMod->GetInputHdl( pViewSh ); + if ( pHdl ) + { + pHdl->InitRangeFinder( aFormula ); + + //! SetSelection at the InputHandler? + //! Set bSelIsRef? + const sal_Int32 nOpen = aFormula.indexOf('('); + const sal_Int32 nLen = aFormula.getLength(); + if ( nOpen != -1 && nLen > nOpen ) + { + ESelection aSel( 0, nOpen + (bSubTotal ? 3 : 1), 0, nLen-1 ); + EditView* pTableView = pHdl->GetTableView(); + if ( pTableView ) + pTableView->SetSelection( aSel ); + EditView* pTopView = pHdl->GetTopView(); + if ( pTopView ) + pTopView->SetSelection( aSel ); + } + } + } } } } |