[Libreoffice-commits] core.git: sc/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 27 19:45:23 UTC 2019
sc/source/ui/inc/navipi.hxx | 4 +---
sc/source/ui/navipi/navipi.cxx | 12 +++++-------
2 files changed, 6 insertions(+), 10 deletions(-)
New commits:
commit cbb09bcedc9e0f00810047dc5f79e9123e3d1617
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Fri Dec 27 20:32:46 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 27 20:44:51 2019 +0100
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 at collabora.co.uk>
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 6a2205072b97..546c18a07c86 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -112,10 +112,9 @@ class ColumnEdit : public SpinField
public:
ColumnEdit(Window* pParent, WinBits nWinBits);
~ColumnEdit() override;
- void SetNavigatorDlg(ScNavigatorDlg *pNaviDlg, const ScDocument* pDoc)
+ void SetNavigatorDlg(ScNavigatorDlg *pNaviDlg)
{
xDlg = pNaviDlg;
- mpDoc = pDoc;
}
SCCOL GetCol() const { return nCol; }
void SetCol( SCCOL nColNo );
@@ -130,7 +129,6 @@ protected:
virtual void dispose() override;
private:
- const ScDocument* mpDoc;
VclPtr<ScNavigatorDlg> xDlg;
SCCOL nCol;
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");
More information about the Libreoffice-commits
mailing list