diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-07-26 13:36:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-07-27 09:26:13 +0200 |
commit | 3ff27fbcc23f4f076a9ca5edd25eebce9dbe24af (patch) | |
tree | ab8f3753a88dda3bd18c6969ac7a980c493e7a47 /sc | |
parent | 870c5443a5fb5e5981c1916cc2ff09dad984f225 (diff) |
pDPObject can never be null
Change-Id: Ie98da9b53e952c2fb1f8f91e4b9489060114c366
Reviewed-on: https://gerrit.libreoffice.org/58113
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmldpimp.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index 3c9a29439652..ecfae1ab28a2 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -96,7 +96,8 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ) : ScXMLImportContext( rImport ), pDoc(GetScImport().GetDocument()), - pDPObject(nullptr), + pDPObject(new ScDPObject(pDoc)), + pDPSave(new ScDPSaveData()), pDPDimSaveData(nullptr), sDataPilotTableName(), sApplicationData(), @@ -194,9 +195,6 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, } } } - - pDPObject = new ScDPObject(pDoc); - pDPSave.reset(new ScDPSaveData()); } ScXMLDataPilotTableContext::~ScXMLDataPilotTableContext() @@ -390,8 +388,7 @@ void ScXMLDataPilotTableContext::SetButtons() } } - if ( pDPObject ) - pDPObject->RefreshAfterLoad(); + pDPObject->RefreshAfterLoad(); } void ScXMLDataPilotTableContext::SetSelectedPage( const OUString& rDimName, const OUString& rSelected ) |