summaryrefslogtreecommitdiff
path: root/sc/source/ui/navipi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-01-03 16:59:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-01-03 21:21:36 +0100
commit5f6cd6272fbe9d6f4276021862442a3004657fb8 (patch)
tree185fbebfe927077b06758aac8c51f30cbd292677 /sc/source/ui/navipi
parentace8602466986e0249aa41845dce4e7da4fcafba (diff)
cid#1456608 Dereference after null check
Change-Id: I47f41b1eae327a0140f4e59184db7a0d7f5b0f67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86196 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/navipi')
-rw-r--r--sc/source/ui/navipi/navipi.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 464f523b0dca..947554ee96d3 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -164,7 +164,7 @@ void ColumnEdit::EvalText()
else
{
ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
- nCol = AlphaToNum( pViewSh->GetViewData().GetDocument(), aStrCol );
+ nCol = AlphaToNum( *pViewSh->GetViewData().GetDocument(), aStrCol );
}
}
else
@@ -200,7 +200,7 @@ void ColumnEdit::SetCol( SCCOL nColNo )
}
}
-SCCOL ColumnEdit::AlphaToNum( const ScDocument* pDoc, OUString& rStr )
+SCCOL ColumnEdit::AlphaToNum( const ScDocument& rDoc, OUString& rStr )
{
SCCOL nColumn = 0;
@@ -208,7 +208,7 @@ SCCOL ColumnEdit::AlphaToNum( const ScDocument* pDoc, OUString& rStr )
{
rStr = rStr.toAsciiUpperCase();
- if (::AlphaToCol( pDoc, nColumn, rStr))
+ if (::AlphaToCol( rDoc, nColumn, rStr))
++nColumn;
if ( (rStr.getLength() > SCNAV_COLLETTERS) || (nColumn > SCNAV_MAXCOL) )