summaryrefslogtreecommitdiff
path: root/sc/source/ui/namedlg
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-14 12:20:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-14 16:44:57 +0100
commit914f9ee7bf7254f2f469bde4cf4c151a4ab25110 (patch)
tree64c11be2675279addc202bc7abda582a833587c0 /sc/source/ui/namedlg
parent285538be45d03e524a404d072a9b0178c74baeaf (diff)
SetReference ScDocument arg is never null
Change-Id: Ifdfe305e5319926d804e14962e786389b79fe476 Reviewed-on: https://gerrit.libreoffice.org/82682 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/namedlg')
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx6
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx6
2 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 79e4923f5b8b..06f8c720f1b7 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -284,14 +284,14 @@ void ScNameDefDlg::RefInputDone( bool bForced)
IsNameValid();
}
-void ScNameDefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
+void ScNameDefDlg::SetReference( const ScRange& rRef, ScDocument& rDocP )
{
if (m_xEdRange->GetWidget()->get_sensitive())
{
if ( rRef.aStart != rRef.aEnd )
RefInputStart(m_xEdRange.get());
- OUString aRefStr(rRef.Format(ScRefFlags::RANGE_ABS_3D, pDocP,
- ScAddress::Details(pDocP->GetAddressConvention(), 0, 0)));
+ OUString aRefStr(rRef.Format(ScRefFlags::RANGE_ABS_3D, &rDocP,
+ ScAddress::Details(rDocP.GetAddressConvention(), 0, 0)));
m_xEdRange->SetRefString( aRefStr );
}
}
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index cdb9e5b18077..cf9da658f1d4 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -158,14 +158,14 @@ void ScNameDlg::RefInputDone( bool bForced)
RefEdModifyHdl(*m_xEdAssign);
}
-void ScNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
+void ScNameDlg::SetReference( const ScRange& rRef, ScDocument& rDocP )
{
if (m_xEdAssign->GetWidget()->get_sensitive())
{
if ( rRef.aStart != rRef.aEnd )
RefInputStart(m_xEdAssign.get());
- OUString aRefStr(rRef.Format(ScRefFlags::RANGE_ABS_3D, pDocP,
- ScAddress::Details(pDocP->GetAddressConvention(), 0, 0)));
+ OUString aRefStr(rRef.Format(ScRefFlags::RANGE_ABS_3D, &rDocP,
+ ScAddress::Details(rDocP.GetAddressConvention(), 0, 0)));
m_xEdAssign->SetRefString( aRefStr );
}
}