diff options
author | Eike Rathke <erack@erack.de> | 2011-08-25 01:59:46 +0200 |
---|---|---|
committer | Eike Rathke <erack@erack.de> | 2011-08-25 02:03:53 +0200 |
commit | 792dee46f2b35a21167af182416803c0b80b517c (patch) | |
tree | 7bc758a0e9c09f26e117b859b7c632eb4753d135 /sc/source/filter/html | |
parent | 47994ad7f4a1ba2dc158f8bf3c158bc528fb81d1 (diff) |
crash when modifying a defined name (and other places as well)
In ScRangeName::insert() the underlying
::boost::ptr_set_adapter::insert(p) takes ownerwhip of p and in the case
it can't insert it deletes the object. So, if ScRangeName::insert()
returns false the object where p pointed to is gone.
Adapted various places.
Diffstat (limited to 'sc/source/filter/html')
-rw-r--r-- | sc/source/filter/html/htmlimp.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 4b2b1dc54ebe..52eb9de3528d 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -132,8 +132,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const String& rName, const ScTokenArray aTokArray; aTokArray.AddDoubleReference( aRefData ); ScRangeData* pRangeData = new ScRangeData( pDoc, rName, aTokArray ); - if( !pDoc->GetRangeName()->insert( pRangeData ) ) - delete pRangeData; + pDoc->GetRangeName()->insert( pRangeData ); } void ScHTMLImport::WriteToDocument( |