summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-05-09 05:01:01 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-05-09 23:29:45 +0200
commit67c7ef9525308341aed98ecf6ebd06c75cb90466 (patch)
tree4ff66fd3df304852f3ca0dd66cb92f93f79d8e7d /sc
parent615d8be81a89edc73702534db8a0a7a4b81ef877 (diff)
coverity#705446: self assignment
Change-Id: I950a6d971b1be742fa7c0ce26697cd84121a14d0
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmldpimp.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 1b9260be627e..83f58f7b9e56 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -541,16 +541,14 @@ void ScXMLDataPilotTableContext::EndElement()
if (pDPDimSaveData)
pDPSave->SetDimensionData(pDPDimSaveData);
pDPObject->SetSaveData(*pDPSave);
- if (pDoc)
- {
- ScDPCollection* pDPCollection = pDoc->GetDPCollection();
- // #i94570# Names have to be unique, or the tables can't be accessed by API.
- if ( pDPCollection->GetByName(pDPObject->GetName()) )
- pDPObject->SetName( String() ); // ignore the invalid name, create a new name in AfterXMLLoading
+ ScDPCollection* pDPCollection = pDoc->GetDPCollection();
- pDPCollection->InsertNewTable(pDPObject);
- }
+ // #i94570# Names have to be unique, or the tables can't be accessed by API.
+ if ( pDPCollection->GetByName(pDPObject->GetName()) )
+ pDPObject->SetName( String() ); // ignore the invalid name, create a new name in AfterXMLLoading
+
+ pDPCollection->InsertNewTable(pDPObject);
SetButtons();
}