diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-12-27 20:32:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-27 20:44:51 +0100 |
commit | cbb09bcedc9e0f00810047dc5f79e9123e3d1617 (patch) | |
tree | a4db0db2fe069ea58303158bb63dc50697377486 /sc/source/ui/navipi | |
parent | 084d546858ef05c0c71c9fe6b3bca7961b62899e (diff) |
tdf#129533 Calc crashes on Navigator click or move
regression from
commit 5bcdbf03012e9d2754c3eb166bd5a01201406d9b
Date: Fri Dec 13 20:45:33 2019 +0200
sc: rowcol: tdf#50916 convert Valid* methods
Change-Id: I0357b125653821ae552cb270f0d64598feedffa3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85874
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/navipi')
-rw-r--r-- | sc/source/ui/navipi/navipi.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 148064db54a1..464f523b0dca 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -69,7 +69,6 @@ void ScNavigatorDlg::ReleaseFocus() ColumnEdit::ColumnEdit(Window* pParent, WinBits nWinBits) : SpinField(pParent, nWinBits) - , mpDoc(nullptr) , nCol(0) { SetMaxTextLen(SCNAV_COLDIGITS); // 1...256...18278 or A...IV...ZZZ @@ -163,7 +162,10 @@ void ColumnEdit::EvalText() if ( CharClass::isAsciiNumeric(aStrCol) ) nCol = NumStrToAlpha( aStrCol ); else - nCol = AlphaToNum( mpDoc, aStrCol ); + { + ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() ); + nCol = AlphaToNum( pViewSh->GetViewData().GetDocument(), aStrCol ); + } } else nCol = 0; @@ -460,11 +462,7 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent) { get(aLbDocuments, "documents"); get(aEdCol, "column"); - ScTabViewShell* pViewSh = GetTabViewShell(); - if (pViewSh) - { - aEdCol->SetNavigatorDlg(this, pViewSh->GetViewData().GetDocument()); - } + aEdCol->SetNavigatorDlg(this); get(aEdRow, "row"); aEdRow->SetNavigatorDlg(this); get(aTbxCmd, "toolbox"); |