summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/pfiltdlg.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-14 16:42:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-15 21:36:27 +0200
commitbf3d1b8e8f89bfdb409c70cfea126f36474d4772 (patch)
tree9d496d04fc1bbd76c15ab215f947ac28587f0e1e /sc/source/ui/dbgui/pfiltdlg.cxx
parent957adc83e67276805c6dcd7be1ea23c142c49306 (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/dbgui/pfiltdlg.cxx')
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 98b0580bdda9..2c257ac686d2 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -89,7 +89,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
m_xBtnUnique->set_active( !theQueryData.bDuplicate );
pViewData = rQueryItem.GetViewData();
- pDoc = pViewData ? pViewData->GetDocument() : nullptr;
+ pDoc = pViewData ? &pViewData->GetDocument() : nullptr;
// for easier access:
aFieldLbArr [0] = m_xLbField1.get();
@@ -307,7 +307,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
sal_Int32 nConnect1 = m_xLbConnect1->get_active();
sal_Int32 nConnect2 = m_xLbConnect2->get_active();
- svl::SharedStringPool& rPool = pViewData->GetDocument()->GetSharedStringPool();
+ svl::SharedStringPool& rPool = pViewData->GetDocument().GetSharedStringPool();
for ( SCSIZE i=0; i<3; i++ )
{