diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-14 16:42:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 21:36:27 +0200 |
commit | bf3d1b8e8f89bfdb409c70cfea126f36474d4772 (patch) | |
tree | 9d496d04fc1bbd76c15ab215f947ac28587f0e1e /sc/source/ui/miscdlgs/datafdlg.cxx | |
parent | 957adc83e67276805c6dcd7be1ea23c142c49306 (diff) |
establish that ScViewData::GetDocument can always return ScDocument&
we can only be ctored with a ScDocShell& or ScDocument&, and ScDocShell
provides a ScDocument& from its GetDocument() so we can always have a
ScDocument& when a public ctor has completed
some null checks can then be seen to be redundant and are removed
Change-Id: Ifaf39cb06e8dbce363999c05ee0aeb3ec4f00428
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102775
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/miscdlgs/datafdlg.cxx')
-rw-r--r-- | sc/source/ui/miscdlgs/datafdlg.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index d6026c8b7937..df21fb4c26b7 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -47,8 +47,8 @@ ScDataFormDlg::ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShel OSL_ENSURE( pTabViewShell, "pTabViewShell is NULL! :-/" ); ScViewData& rViewData = pTabViewShell->GetViewData(); - pDoc = rViewData.GetDocument(); - if (pDoc) + pDoc = &rViewData.GetDocument(); + { ScRange aRange; rViewData.GetSimpleArea( aRange ); |